This program use to calculating waiting time and turn around time of round robin scheduling. The program can't enter the arrival time. So, all the process have arrival time = 0.
This is the source code :
#include
#include"alloc.h"
main()
{
char pil = 'Y';
do {
int st[10],bt[10],wt[10],tat[10],n,tq;
int i,count=0,swt=0,stat=0,temp,sq=0;
float awt=0.0,atat=0.0;
// clrscr();
printf("Masukkan jumlah proces:");
scanf("%d",&n);
printf("Masukkan burst time secara berurutan: \n");
for(i=0;i
st[i]=st[i]-tq;
else
if(st[i]>=0)
{
temp=st[i];
st[i]=0;
}
sq=sq+temp;
tat[i]=sq;
}
if(n==count)
break;
}
for(i=0;i
}while (pil == 'Y'||pil =='y');
}
//this is the end of program.
or you can download executable program in http://www.ziddu.com/download/7474550/debugrr.exe.rar.html
You can fix this program by completing entering arrival time.
That all folks...
Cheers
nti bisa dikembangkan lagi dg arrival time, sehingga adik kelas tdk kesusahan mencari aplikasi ini.thx
ReplyDeleteYa pak zaenal... Kemarin saya sudah mencoba menggunakan struktur data linked list. Tapi masih terkendala pada algoritma penghitungan arrival timenya. Akhirnya saya putuskan untuk menggunakan array, walaupun tidak bisa menghitung arrival time...
ReplyDelete"soalnya lupa-lupa ingat sama C++"