CS FundamentalsVery hardGATE CS (PYQ pattern)
Preemptive priority scheduling (a smaller number means higher priority; equal priorities are served by earlier arrival, without time slicing) runs processes (arrival, burst, priority): A (0, 7, 3), B (1, 5, 1), C (2, 6, 4), D (4, 3, 2), E (6, 4, 1), F (9, 2, 5). At what time does process A complete?
- A. 16 ms
- B. 22 ms
- C. 13 ms
- D. 19 ms
Correct answer: D. 19 ms
Unit-step simulation: B (priority 1) preempts A at t = 1, D (2) runs after B, E (1) arrives and preempts D... completion times are {'B': 6, 'E': 10, 'D': 13, 'A': 19, 'C': 25, 'F': 27}.
More Operating Systems questions
- A lottery scheduler holds a fresh draw every quantum. Process A has 100 tickets, B has 200 and C has 300 (every process always stays…
- Rate-monotonic scheduling (preemptive, deadline = period, all tasks released together at t = 0) is used for T1 (C = 1, period 4), T2 (C =…
- A 3-level paging system has a TLB (1 ns, hit ratio 95%) and a cache in front of memory (10 ns hit time, 90% hit ratio, and a miss costs 10…
- Segment table (base, limit in bytes): seg 0 = (1000, 400), seg 1 = (2400, 100), seg 2 = (3000, 250), seg 4 = (500, 60); segment 3 is not…
- A system uses LRU with 3 frames (initially empty). A dirty page is written back to disk only when it is evicted; a page is dirty if it was…
- LFU replacement with 3 frames (initially empty): the victim is the resident page with the smallest reference count since it was loaded…