Measurements of a certain system have shown that a process runs, on the
average, for time T before blocking for Input/Output. Process switch
requires time S which is overhead. For round robin scheduling with quantum
Q, give a formula for the cpu efficiency in each of the following cases:
(a) Q=infinity (b) Q>T (c) S<Q<T (d) Q=S (e) Q nearly 0
Answer:
cpu efficiency is useful cpu time/total cpu time, i.e. sum of cpu
useful time and cpu overhead in switching processes.
For (a) and (b) a process runs for T and a switch occurs when it gets
blocked. Efficiency is T/(T+S)
In (c), since Q<T, each run of T requires T/Q process switches, resulting
in overhead of ST/Q and therefore, the efficiency is T/(T+(ST/Q)) which is
Q/(Q+S).
For (d), take Q for S in (c) and we get Q/(Q+Q) which is 50%
For (e), the efficiency goes to 0 as Q goes to 0
Can somebody please explain option c and hence option D with example ,Thanks and sorry if it is naive question :)