CS FundamentalsHardTCS NQT · Infosys interview pattern
Processes (arrival, burst): P1 (0, 8), P2 (1, 4), P3 (2, 2), P4 (3, 5). What is the average waiting time under preemptive SJF (Shortest Remaining Time First)?
- A. 5.75
- B. 4
- C. 9
- D. 4.25
Correct answer: D. 4.25
P1 0–1, P2 1–2 (4 < 7), P3 2–4 (2 < 3), P2 4–7, P4 7–12, P1 12–19. Waiting: P1 11, P2 2, P3 0, P4 4 → 17/4 = 4.25. 9 is the average turnaround time.
More Operating Systems questions
- Reference string: 5, 2, 5, 8, 2, 3, 5, 9, 8, 2, 3, 5. With 3 frames, initially empty, how many page faults does LRU replacement cause?
- Reference string: 1, 3, 0, 3, 5, 6, 3, 1, 0, 6, 5, 3. With 3 frames, initially empty, how many page faults does the Optimal (Belady’s MIN)…
- A disk has cylinders 0–199 and the head is at cylinder 100. Pending requests: 45, 130, 12, 180, 90, 150, 60. What is the total head…
- Three processes share a single resource type with identical instances. Their maximum needs are 3, 4 and 5 instances. What is the minimum…
- Which of the following is NOT a requirement for a correct solution to the critical-section problem?
- Under Highest Response Ratio Next (non-preemptive), the CPU becomes free at time 9. Ready processes (arrival, burst): P2 (2, 3), P3 (4…