in Operating System
329 views
0 votes
0 votes

If there are ‘n’ processes in a system, with the time-quanta less than the CPU burst times of all
these processes in a given round, then the number of preemptions is at least:
(A) 2n (B) n (C) 2n–1 (D) n–1
 

in Operating System
by
329 views

1 comment

Asked “Least preemptions”
Constraints “Time quanta is less than CPU BT of all processes”
Assumption “There was no process using CPU hence initial preemption is ignored”
Best Case, We will need only 2 passes of all the processes as time quanta is less than all of them.

1st Pass : P1 || CS || P2 || CS ||…. || Pn ie n-1 Context Switches
2nd Pass : || CS || P1 || CS || P2 || CS ||….. || Pn ie n Context Switches

n+n-1 = 2n-1.

This is the rough idea, IDK how to do formal proofs.
1
1

Please log in or register to answer this question.

Related questions

1 vote
1 vote
0 answers
3
saurabh rai asked in Operating System Dec 12, 2019
495 views
saurabh rai asked in Operating System Dec 12, 2019
495 views