If the time quantum size is 2 units and there is only one job of 14 time unit…
2017
If the time quantum size is 2 units and there is only one job of 14 time unit in a ready queue, the round-robin scheduling algorithm will cause ______ context switches.
- A.
8
- B.
5
- C.
6
- D.
7
Attempted by 634 students.
Show answer & explanation
Correct answer: C
Total CPU burst time = 14 units
Time quantum = 2 units
Number of time slices (quanta): 14÷2=7 time slices A context switch occurs when a running process is stopped and later resumed .
With only one job , after each quantum (except the last), the process is taken off the CPU and then scheduled again.
Hence, context switches occur:
Context switches=Number of slices−1=7−1=6