2,286 views
5 votes
5 votes
Consider a System with n–processes arriving at time 0. Scheduling overhead is ‘s’ seconds. Using Round Robin CPU Scheduling what must be the value of time quantum ‘q’ such that each process is guaranteed to gets its turn on the CPU in its subsequent run exactly twice within ‘t’ sec (inclusive)?

please give detailed explaination.

1 Answer

Best answer
5 votes
5 votes

See first we verify this for smaller no of processes ..Say we have 2 number of processes..So according to the question :

|| P1 || P2 || P1 || P2 ||

So since the word  " inclusive " is used we have to consider all the time intervals involved here including first and last overheads(context switches)..

So here we can see we have 4 time quanta and 5 context switches..Hence for n processes , we can generalise it as :

Having 2n time quanta and (2n + 1) context switches..Hence ,

            2n q + (2n + 1) s  =  t

==>      2n q     =  t - (2n + 1)s

==>      q         =  [t - (2n + 1)s] / 2n

Hence the required time quantum is q =   [t - (2n + 1)s] / 2n 

selected by

Related questions

0 votes
0 votes
3 answers
1
0 votes
0 votes
0 answers
3
Prakhar Singh Gaharw asked Oct 21, 2018
443 views
processes 1,2,3,4,5 with burst time as 4,1,8,1,2 and arrival time as 0+ RoundRobin used with TQ=1 what will be arrival time chart for processes 1,2,3,4,5.