Round Robin

  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Round Robin as PDF for free.

More details

  • Words: 178
  • Pages: 3
//round robin #include<stdio.h> #include #include struct process { int pid; int atime; int wtime; int left; int btime; int ttime; int finish; }pro[5]; int i=0; int finish() { int j; for(j=0;j>choice; if(choice==1) { cout<<"Process id:"; cin>>pro[i].pid; cout<<"Arrival time:"; cin>>pro[i].atime; cout<<"Burst time:"; cin>>pro[i].btime; pro[i].left=pro[i].btime; pro[i].finish=0; i++; } }while(choice==1);

clrscr(); cout<<"Gauntt Chart\n"; int tslice=4; int s=0; int flag; int totaltime=0; int j,c; do { flag=1; for(j=0;jtslice) { pro[j].left=pro[j].left-tslice; totaltime+=tslice; for(int d=0;d
} }//end of for if(flag==1) { c=finish(); if(c!=1) { textcolor(i); cprintf("%c",char(219)); totaltime++; chart[s++]='i'; }

} }while(c!=1);

}

chart[s]='\0'; cout<<endl; for(int k=0;k<s;k++) { cout<

Related Documents

Round Robin
June 2020 11
Round Robin
June 2020 6
Robin Resume
May 2020 7
1loan Robin
November 2019 14