CS FundamentalsVery hardGATE CS
Processes (arrival, burst): P1 (0, 12), P2 (2, 4), P3 (3, 6), P4 (8, 5), P5 (10, 2). Under SRTF, which process waits the longest, and for how long?
- A. P1, 17 ms
- B. P3, 20 ms
- C. P3, 3 ms
- D. P1, 29 ms
Correct answer: A. P1, 17 ms
SRTF: P1 0-2 | P2 2-6 | P3 6-12 | P5 12-14 | P4 14-19 | P1 19-29. Waiting times: P1 17, P2 0, P3 3, P4 6, P5 2. The long job P1 keeps being overtaken by shorter arrivals.
More Operating Systems questions
- Processes (arrival, burst): A (0, 5), B (1, 7), C (3, 2), D (4, 6). Round Robin with quantum 4 (new arrivals queued before a preempted…
- Processes (arrival, burst, priority; smaller number = higher priority): P1 (0, 3, 2), P2 (1, 6, 1), P3 (2, 4, 3), P4 (12, 2, 1), P5 (13…
- Processes (arrival, burst): A (0, 6), B (2, 6), C (5, 9), D (5, 8), E (5, 2). Under non-preemptive HRRN, what is the average waiting time?
- Two processes each alternate CPU and I/O: P1 = CPU 4, I/O 6, CPU 2; P2 = CPU 3, I/O 3, CPU 5 (ms). Both arrive at 0, P1 first; scheduling…
- Reference string: 7, 2, 3, 1, 2, 5, 3, 4, 6, 7, 7, 1, 0, 5, 4, 6, 2, 3, 0, 1. With 3 frames (initially empty), what are the page-fault…
- Reference string: 1, 2, 1, 3, 1, 2, 4, 5, 4, 2, 5, 3, 4, 2, 3 frames, initially empty. LFU replacement is used: the victim is the resident…