CS FundamentalsModerateGATE CS · Amazon/Microsoft SDE MCQ
Five batch jobs arrive together with run times 9, 6, 3, 5 and x, where x < 3. In what order should they run to minimise average turnaround time, and does the order depend on x?
- A. x, 3, 5, 6, 9 for every x < 3
- B. 9, 6, 5, 3, x, longest first
- C. x, 3, 5, 6, 9 only if x < 2
- D. Any order; the total is fixed
Correct answer: A. x, 3, 5, 6, 9 for every x < 3
Shortest-job-first minimises average turnaround when all jobs are present. For x < 3 the sorted order is x, 3, 5, 6, 9 regardless of x's exact value. The total is fixed, but the average depends on order.
More Operating Systems questions
- Statement 1: Under round robin, as the quantum shrinks towards the context-switch time, CPU efficiency approaches 50%. Statement 2: For a…
- Which of these must a process NOT be able to do in user mode on a typical protected OS?
- A process's working set grows from 40 to 70 pages while it holds 50 frames under local replacement, and the system has 10 free frames…
- SRTF scheduling (on a tie the running process continues); processes (arrival, burst): P1 (0, 7), P2 (2, 4), P3 (4, 1), P4 (5, 4), P5 (9…
- A loop references pages 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4 with 3 frames, initially empty. How many faults occur under FIFO, LRU and OPT?
- Banker's algorithm, resources (A, B, C). Available = (1, 1, 2). Allocation / Max: P0 (1,0,1)/(2,1,2), P1 (2,1,0)/(3,2,2), P2…