Consider three CPU intensive processes, which require 10,20 and 30 units of time and arrive at times 0,2 and 6 respectively. How many context switches are needed if the operating system implements a shortest remaining time first scheduling algorithm? Do not count the context switches at time zero and at the end.
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: B. 2
Explanation
P1 runs 0–10 (P2 arriving at 2 needs 20 > 8 left), then P2 10–30, then P3 30–60. Two context switches (at 10 and 30).
More System Software and Operating System questions
- At a particular time of computation, the value of a counting semaphore is 7. Then 20 P (wait) operations and 15 V (signal) operations are c…
- The minimum number of page frames that must be allocated to a running process in a virtual memory environment is determined by
- A computer has six tape drives with (n) processes competing for them. Each process may need two drives. What is the maximum value of (n) fo…
- Which of the following UNIX/Linux pipes will ⋅c count the number of lines in all the files having h and as their extension in the current w…
- Which of the following statement/s is/are true? (i) Windows XP supports both peer-peer and client-server networks. (ii) Windows XP implemen…
- In Linux operating system environment _______ command is used to print a file.