in Operating System edited by
460 views
0 votes
0 votes

Lets consider one situation where,
OS is scheduling processes(P1,P2,P3...Pn) with Round Robin method and current running process is P1 and next scheduled process in queue is also P1 (this case is possible in Round Robin).

Will a context switch occur after the quantum time is over?
Provide reason behind your answer.

Supporting Question:

How many context switch will take place in Round Robin scheduling method with quantum=3unit for the given data below. AT=Arrival Time, BT=Burst Time

in Operating System edited by
460 views

4 Comments

@Kabir5454
question is elaborated little more, please check.

0
0

@Kabir5454, yes context switch between same process, is implemention defined. 

1
1
Context switch would occur if there is another process in the ready queue waiting for the processor. Since there aren't any hence the dispatcher will not be invoked, in other words no context switch occurs .. imo.

As for the second part, there would be 11 context switches considering the dispatching of the 1st process as a context switch from a previous process. P2 will execute for 4 seconds hence it will require two time quanta but context switch should not happen. .. again imo.
0
0

1 Answer

0 votes
0 votes
11 context switches , context switch at 0 and at termination is not considered (default)

Related questions