CS FundamentalsHardProduct-company MCQ 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). Compare preemptive and non-preemptive priority scheduling. Which statement is correct?
- A. Preemptive gives 4.75 and non-preemptive 5.25
- B. Preemptive gives the lower average waiting time, 5.25 vs 5.50
- C. Non-preemptive gives the lower average waiting time, 5.25 vs 5.50
- D. Both give 5.50
Correct answer: C. Non-preemptive gives the lower average waiting time, 5.25 vs 5.50
Non-preemptive: A 0–5, B 5–8, D 8–14, C 14–22 → waits 0, 4, 12, 5 = 5.25. Preemptive: A 0–1, B 1–4, D 4–10, A 10–14, C 14–22 → waits 9, 0, 12, 1 = 5.5. Preemption helps high-priority jobs but does not always lower the average.
More Operating Systems questions
- Reference string: 3, 1, 4, 3, 2, 1, 5, 3, 4, 1, 2, 5, 4, 3 frames, initially empty. Which statement is correct?
- Reference string: 3, 1, 4, 3, 2, 1, 5, 3, 4, 1, 2, 5, 4. With 3 frames, initially empty, how many page faults does the Optimal (OPT)…
- Assertion (A): For FIFO page replacement, increasing the number of frames can increase the number of page faults. Reason (R): FIFO is a…
- Five processes P0–P4 and three resource types A, B, C. Allocation: P0 (1,0,1), P1 (2,1,1), P2 (0,1,2), P3 (1,1,0), P4 (0,0,2). Max: P0…
- A system has 6 identical tape drives. Each of n processes needs at most 2 drives. What is the maximum n for which the system is guaranteed…
- How many of the following statements about deadlock are correct? 1. Requiring a process to request all its resources at once prevents…