Round Robin Scheduling
Round Robin Scheduling
PROGRAM
#include<stdio.h>
#include<conio.h>
avg_wt=0; avg
tat=0; for(i=0;
i<n; i++)
{ avg_wt +=
wt[i];
avg_tat += tat[i];
}
OUTPUT:
Process 1:10
Process 2:5
Process 3: 8
1 10 12 22
2 5 0 5
3 8 14 22
#include<stdio.h>
#include<conio.h>
void main() {
int n, i, j;
int bt[10], p[10], wt[10], tat[10];
int avg_wt, avg_tat;
temp = p[i];
p[i] = p[i];
p[j] = temp;
}
}
}
wt[0] = 0;
tat[0] = bt[0];
avg_wt/= n;
avg_tat /= n;
OUTPUT:
Priority: 2
Priority: 1
Priority: 3
1 8 2 0 8
2 4 1 8 12
3 6 3 12 18
Average Waiting Time: 6.67