CS FundamentalsModerateGATE CS
Five processes arrive with burst times: P1 (arrival 0, burst 8), P2 (1, 4), P3 (2, 9), P4 (3, 5), P5 (4, 2). Under preemptive SJF (SRTF), the average waiting time is:
- A. 8.2 ms
- B. 11.4 ms
- C. 6.6 ms
- D. 5.4 ms
Correct answer: C. 6.6 ms
The schedule is P1(0-1), P2(1-5), P5(5-7), P4(7-12), P1(12-19), P3(19-28). Completion times 19, 5, 28, 12, 7 give waiting times 11, 0, 17, 4, 1, average 33/5 = 6.6 ms. 11.4 is FCFS and 8.2 is non-preemptive SJF.
More Operating Systems questions
- A system has 3 resource types and processes P0-P3. Allocation: P0 (1,0,1), P1 (2,1,0), P2 (1,1,1), P3 (0,1,2). Maximum: P0 (3,2,2), P1…
- A paged system has a TLB lookup time of 10 ns, a TLB hit ratio of 90% and a memory access time of 100 ns. A TLB miss needs one extra…
- Semaphores S = 0 and T = 0 are shared. P1 executes: print A; signal(S); print B. P2 executes: wait(S); print C; signal(T). P3 executes…
- A Unix-style inode has 12 direct pointers, one single-indirect and one double-indirect pointer. Block size is 2 KB and a block pointer is…
- A process with pages numbered 0 to 4 references them in the order 0 4 0 1 3 4 0 1 4 0 2 0 4 1 3 2. Under FIFO replacement with initially…
- With 3 initially empty frames, the reference string 1 1 1 3 2 6 6 3 3 5 2 5 1 5 6 2 4 6 4 6 5 3 is processed under LRU and under the…