CS FundamentalsHardTCS Digital · Infosys
Processes P1 (arrival 0, burst 8), P2 (1, 4), P3 (2, 9) and P4 (3, 5) are scheduled by SRTF (preemptive shortest remaining time first). What is the average waiting time?
- A. 5.5 ms
- B. 7.25 ms
- C. 8 ms
- D. 6.5 ms
Correct answer: D. 6.5 ms
Completion times are 17, 5, 26, 10; waiting = completion - arrival - burst = 9, 0, 15, 2, an average of 6.5 ms.
More Operating Systems questions
- Banker's algorithm: Available = (3, 3, 2). Allocation / Max for (A, B, C): P0 (0,1,0)/(7,5,3), P1 (2,0,0)/(3,2,2), P2 (3,0,2)/(9,0,2), P3…
- A system uses a two-level page table. A TLB lookup takes 10 ns, a memory access takes 100 ns and the TLB hit ratio is 80%. On a TLB miss…
- The reference string 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5 is run under FIFO replacement first with 3 frames and then with 4 frames (all…
- The head is at cylinder 50 moving towards higher cylinders, and the queue is 82, 170, 43, 140, 24, 16, 190. What is the total head…
- Free partitions in memory order are 100, 500, 200, 300 and 600 KB. Processes of 212, 417, 112 and 426 KB arrive in that order. Which…
- A spinlock is built with an atomic test-and-set instruction. Which property does the plain version of this lock NOT guarantee?