CS FundamentalsVery hardGATE CS
Assertion (A): Shortest Remaining Time First is optimal for average waiting time when preemption is free. Reason (R): Running the job with the least remaining work first minimises the number of jobs waiting at every instant.
- A. Both A and R are true, but R is not the correct explanation of A
- B. A is true but R is false
- C. A is false but R is true
- D. Both A and R are true, and R is the correct explanation of A
Correct answer: D. Both A and R are true, and R is the correct explanation of A
Average waiting equals the time integral of the number of waiting jobs divided by n. Finishing the smallest remaining job first reduces that count as early as possible (exchange argument), which is why SRTF is optimal.
More Operating Systems questions
- A multilevel queue scheduler has a foreground (interactive, RR) queue with absolute priority over a background (batch, FCFS) queue, and…
- In a multilevel feedback queue, why do I/O-bound interactive processes tend to stay in the highest-priority queue?
- On a multiprocessor, the scheduler tries to keep a thread on the CPU it ran on last. Which benefit does this processor affinity provide…
- Linux's CFS gives each runnable task a virtual runtime that increases more slowly for higher-weight (lower nice) tasks, and always runs…
- Which statement about scheduler activations / the two-level (many-to-many) threading model is correct?
- How many of these statements about virtual memory are correct? 1. A process can have a virtual address space larger than physical memory…