13,044 views
4 votes
4 votes

Here what are the number of context switches ? Is it 5 or 6? Do we consider context switch before P1 (i.e during the start) ?

2 Answers

5 votes
5 votes
Here total 5 context switches ocur .

`p1 - p2

p2 - p3

p3- p4

p4 - p1

p1- p3

 

during start there is context switch but we don't consider that case.
1 votes
1 votes

context switch occurs when a computer’s CPU switches from one process or thread to a different process or thread.

It should be 5.

Answer:

Related questions

1 votes
1 votes
1 answer
2
sanyam53 asked Jan 7, 2017
1,653 views
How many time context switch in Round Robin? ( if only one process remain in ready queue at end of scheduling does that count every time, when time slice over or only one...