Posts

Showing posts from February, 2014

Round Robin & Shortest Job First in C/C++

Image
Hey guys, its project I had worked on. It is used for process scheduling. Please save the file with .cpp extension. Hope you guys like it. Here's the screen shot of the output. Here's the source code, enjoy coding.. /* Pogrammer : Ashok Kumar Shrestha Program: Round Robin and Shortest job first scheduling */ #include<stdio.h> #include<conio.h> #include<graphics.h> #include<dos.h> #include<process.h> struct proc { int id; int arrival; int burst; int rem; int wait; int finish; int ti; int turnaround; float ratio; }process[10]; int no,k; int chkprocess(int); int nextprocess1(); int nextprocess(int); void main1(); void rr(); void sjs(); void input(int num); void oppage(int, int); void bar_print(int,int); void table_print(int); void loading() { int d=3,i,x1=120,y1=350,x2=x1+400,y2=y1+15; char arr[10]; cleardevice(); moveto(260,50); setcolor(7); settextstyle(4,0,10); outtext("