#include
#include
#include
int t,n,s,bt[10],ct[10],ta[10],w[10],lat[10],wav,taav;
int allover()
{
for(int i=0;i0)
return 0;
return 1;
}
void select(int p)
{
w[p]+=t-lat[p];
if(ct[p]>=s)
{
ct[p]-=s;
t+=s;
}
else
{
t+=ct[p];
ct[p]=0;
}
if(ct[p]==0)
ta[p]=t;
lat[p]=t;
}
void main()
{
int p=0;t=0;taav=0;wav=0;
clrscr();
printf("Enter the number of process : ");
scanf("%d",&n);
printf("\n Enter the time slice : ");
scanf("%d",&s);
printf("\nEnter the burst time of processes \n ");
for(int i=0;i
No comments:
Post a Comment