CS FundamentalsHardHCL · Tech Mahindra pattern
Processes: A (arrival 0, burst 5), B (arrival 1, burst 3), C (arrival 2, burst 8), D (arrival 3, burst 6). Priorities: A = 3, B = 1, C = 4, D = 2 (lower number = higher priority). Under PREEMPTIVE priority scheduling, what is the average waiting time?
- A. 5.25
- B. 5.75
- C. 5.50
- D. 11.00
Correct answer: C. 5.50
Gantt: A 0–1, B 1–4 (preempts A), D 4–10, A 10–14, C 14–22. Waiting = 9, 0, 12, 1 → 22/4 = 5.5. Non-preemptive priority gives 5.25, FCFS gives 5.75, and 11.00 is the average turnaround time, not waiting time.
More Operating Systems questions
- Cylinders 0–199, head at 72 moving towards higher cylinders. Requests: 110, 25, 160, 47, 130, 8, 95, 185. Under C-LOOK, counting the jump…
- In the first readers–writers problem (readers get priority: a reader never waits if the resource is already being read), which problem can…
- When is a spinlock (busy-waiting lock) preferable to a blocking lock?
- Modern fork() implementations use copy-on-write. Which statement is correct?
- Segment table (base, limit): S0 (1400, 600), S1 (6300, 400), S2 (4300, 300), S3 (3200, 1100). What happens for logical addresses (2, 120)…
- Page size is 1 KB. The page table maps page 0 → frame 3, page 1 → frame 7, page 2 → frame 5, page 3 → frame 2. What physical address…