CS FundamentalsEasyTCS NQT · Infosys interview pattern
Which CPU scheduling algorithm can make a long process wait indefinitely if short processes keep arriving?
- A. First-Come, First-Served (FCFS)
- B. Round Robin
- C. None — no scheduling algorithm can cause starvation
- D. Shortest Job First (SJF)
Correct answer: D. Shortest Job First (SJF)
SJF always prefers the shortest job, so a long job can starve while shorter ones keep arriving. FCFS and Round Robin serve every process in turn, so they do not starve anyone.
More Operating Systems questions
- Which part of the operating system selects which process in the ready queue gets the CPU next?
- Processes (arrival, burst): P1 (0, 4), P2 (1, 3), P3 (2, 6), P4 (4, 2). What is the average turnaround time under FCFS?
- Reference string: 1, 3, 0, 3, 5, 6, 3, 1, 0, 6, 5, 3. With 3 frames, initially empty, how many page faults does FIFO replacement cause?
- Pure paging (fixed-size pages and frames) can suffer from which kind of fragmentation?
- The Banker’s algorithm is used for which strategy of handling deadlocks?
- If the time quantum of Round Robin scheduling is made larger than the longest CPU burst of every process, Round Robin behaves like: