CPU Scheduling MCQs for NSCT

By the NSCT Exam Editorial Team · Updated 2026-11-24 · Facts checked against official sources on 2026-11-24

CPU scheduling is how the operating system decides which process in the ready queue gets the CPU next, and for how long. The main algorithms are FCFS, SJF (and its preemptive form, SRTF), priority and round robin, and you judge them by waiting, turnaround and response time. It is topic 4 of the Operating Systems area, which carries 5% of the NSCT according to HEC's Areas of Competencies. Operating Systems had the lowest accuracy of any area in 2026, at 33.8%, per the HEC NSCT report and APP, so careful arithmetic here pays off.

Three formulas carry every numerical (for a process with no I/O):

A preemptive scheduler can take the CPU away from a running process; a non-preemptive one waits until the process finishes its burst or blocks. Processes and the ready queue are covered in Process Management.

FCFS

First-come, first-served runs processes in arrival order and is non-preemptive. It is simple, but the average wait depends heavily on order.

Example: P1 (12 ms), P2 (3 ms) and P3 (3 ms) all arrive at time 0 in that order. The waits are 0, 12 and 15, so the average is 9 ms. If the short jobs came first, the average would drop to 3 ms.

Exam angle: one long CPU-bound job holding up many short ones is the convoy effect, the classic FCFS weakness.

SJF

Shortest-job-first runs the process with the smallest next CPU burst. Silberschatz calls it "shortest-next-CPU-burst" scheduling. It gives the minimum average waiting time for a given set of processes, but the OS cannot know the next burst in advance, so it predicts it with exponential averaging.

Example: P1 (7), P2 (3), P3 (5) and P4 (1), all at time 0. SJF runs P4, P2, P3, P1, giving waits 0, 1, 4 and 9: an average of 3.5 ms, against 8 ms for FCFS in that order.

The preemptive version is SRTF (shortest-remaining-time-first). With P1 (arrival 0, burst 7), P2 (2, 4) and P3 (4, 1), non-preemptive SJF averages 3 ms of waiting, while SRTF averages 2 ms, because P2 and then P3 preempt P1.

Exam angle: check whether the question says "preemptive"; the two versions give different answers whenever arrivals are staggered.

Priority

Priority scheduling runs the highest-priority process first. It can be preemptive or not. Its risk is starvation (a low-priority process waits indefinitely), and the cure is aging, raising a process's priority the longer it waits.

Where books differ: Silberschatz treats a lower number as a higher priority but notes there is no general agreement. Always read the question's convention.

Example (lower number = higher priority): P1 (arrival 0, burst 5, priority 3), P2 (1, 3, 1), P3 (2, 2, 2).

Version Order Average WT
Non-preemptive P1 0-5, P2 5-8, P3 8-10 3.33 ms
Preemptive P1 0-1, P2 1-4, P3 4-6, P1 6-10 2.33 ms

Exam angle: SJF is a special case of priority scheduling (priority = predicted burst), so it can starve long jobs too.

Round robin

Round robin (RR) is FCFS with preemption by a fixed time quantum. A process that has not finished when its quantum expires goes to the back of the ready queue.

Example: P1 (5), P2 (3) and P3 (2), all at time 0, quantum 2 ms. The average wait is 5 ms, worse than FCFS's 4.33 ms here, but the average response time is just 2 ms.

The quantum matters. If it is larger than every burst, RR behaves like FCFS. If it is close to the context-switch time, most CPU time goes on switching.

Exam angle: RR usually has a higher average turnaround than SJF but better response time, which is why time-sharing systems use it.

Gantt charts

A Gantt chart is a timeline showing which process holds the CPU in each interval. Draw it first, then read completion and first-run times straight off it. For the round-robin example above:

| P1 | P2 | P3 | P1 | P2 | P1 |
0    2    4    6    8    9    10

Completion times are P3 = 6, P2 = 9 and P1 = 10, so the waits are 4, 6 and 5.

Exam angle: most wrong answers come from skipping the chart and doing the arithmetic in your head.

Common traps

Worked examples

1. Understanding. Which scheduling criterion matters most to a user typing in an interactive editor? Answer: response time. The user notices how quickly the system first reacts, not when a whole job finishes, which is why interactive systems favour round robin.

2. Application. P1 (arrival 0, burst 6), P2 (1, 4) and P3 (3, 2) are scheduled with round robin, quantum 2 ms. What is the average waiting time? Answer: 4.67 ms. The chart is P1 0-2, P2 2-4, P1 4-6, P3 6-8, P2 8-10, P1 10-12. Completion times 12, 10 and 8 give waits of 6, 5 and 3, so 14/3 = 4.67 ms.

3. Analysis. Four processes arrive at time 0 with bursts P1 = 9, P2 = 1, P3 = 2 and P4 = 3 (queue order P1 to P4). Rank FCFS, SJF and RR (quantum 1) by average waiting time. Answer: SJF 2.5 ms, then RR 4.25 ms, then FCFS 7.75 ms. FCFS suffers the convoy effect behind P1. RR rescues the short jobs but still interleaves them with P1. SJF is optimal. RR does have the best average response time (1.5 ms).

Practise

The quiz below has 99 CPU Scheduling questions, filterable by tier and difficulty.

Practise: 99 questions

Interactive quiz loading. The first 10 questions are shown below.

  1. Many short I/O-bound processes keep queuing behind one long CPU-bound process, so the I/O devices sit idle while they wait. This convoy effect is a well-known weakness of which scheduling algorithm?

    1. Round robin
    2. Shortest-remaining-time-first (SRTF)
    3. First-come, first-served (FCFS)
    4. Multilevel feedback queue
    Show answer

    Answer: C. First-come, first-served (FCFS)

    FCFS is non-preemptive and serves processes strictly in arrival order, so once a long CPU-bound process holds the CPU every short process must wait behind it. That pile-up behind one big process is the convoy effect.

  2. Which technique prevents starvation in priority scheduling by gradually raising the priority of a process the longer it waits?

    1. Context switching
    2. Shortening the time quantum
    3. Demand paging
    4. Aging
    Show answer

    Answer: D. Aging

    Aging increases a waiting process's priority over time (for example, improving it by one level every few minutes). Eventually even the lowest-priority process becomes the highest and gets the CPU, so indefinite blocking cannot happen.

  3. For a process that does no I/O, how is turnaround time calculated?

    1. Completion time minus CPU burst time
    2. Time from arrival until the process first gets the CPU
    3. Total time the process spends in the ready queue
    4. Completion time minus arrival time
    Show answer

    Answer: D. Completion time minus arrival time

    Turnaround time is the whole interval from submission (arrival) to completion: TAT = completion - arrival. It includes both the time spent running and the time spent waiting in the ready queue.

  4. For a process that does no I/O, waiting time is equal to which expression?

    1. Turnaround time minus CPU burst time
    2. Completion time minus arrival time
    3. First-run time minus arrival time
    4. CPU burst time minus arrival time
    Show answer

    Answer: A. Turnaround time minus CPU burst time

    Waiting time is the total time a process sits in the ready queue. Turnaround covers running plus waiting, so subtracting the CPU burst leaves only the waiting part: WT = TAT - burst.

  5. In CPU scheduling, response time is best defined as:

    1. Time from arrival until the process completes
    2. Total time spent waiting in the ready queue
    3. Time from arrival until the process is first given the CPU
    4. Time the dispatcher needs to start the process
    Show answer

    Answer: C. Time from arrival until the process is first given the CPU

    Response time measures how quickly a process starts producing a response: the gap between its arrival and the first time it is scheduled. It matters most in interactive systems, where users care about the first reaction, not the full completion.

  6. For a fixed set of processes that are all available at the same time, which algorithm gives the minimum possible average waiting time?

    1. First-come, first-served (FCFS)
    2. Shortest-job-first (SJF)
    3. Round robin with a small quantum
    4. Priority scheduling with random priorities
    Show answer

    Answer: B. Shortest-job-first (SJF)

    SJF is provably optimal for average waiting time: running a short job before a long one reduces the short job's wait by more than it increases the long job's wait. Any other order can be improved by swapping toward shortest-first.

  7. Shortest-remaining-time-first (SRTF) is the preemptive version of which algorithm?

    1. Priority scheduling
    2. Round robin
    3. Shortest-job-first (SJF)
    4. First-come, first-served (FCFS)
    Show answer

    Answer: C. Shortest-job-first (SJF)

    SRTF applies the SJF rule preemptively: when a new process arrives with a CPU burst shorter than what remains of the running process, the running process is preempted. Non-preemptive SJF would let the current process finish first.

  8. The time the dispatcher takes to stop one process and start another running is called:

    1. Response time
    2. Turnaround time
    3. Dispatch latency
    4. Burst time
    Show answer

    Answer: C. Dispatch latency

    The dispatcher performs the context switch, switches to user mode and jumps to the right location in the user program. The time this takes is dispatch latency, and it is pure overhead, so it should be as small as possible.

  9. Compared with a CPU-bound process, an I/O-bound process typically has:

    1. Many short CPU bursts
    2. A few very long CPU bursts
    3. No CPU bursts between I/O operations
    4. CPU bursts that are always longer than the time quantum
    Show answer

    Answer: A. Many short CPU bursts

    An I/O-bound process spends most of its time waiting for I/O and uses the CPU only briefly between requests, so it shows many short CPU bursts. A CPU-bound process shows a few long bursts.

  10. In round-robin scheduling, if the time quantum is made larger than every process's CPU burst, the algorithm behaves exactly like:

    1. SJF
    2. SRTF
    3. FCFS
    4. Preemptive priority
    Show answer

    Answer: C. FCFS

    If the quantum never expires, each process runs its whole burst once it reaches the head of the queue, and the queue is served in arrival order. That is precisely first-come, first-served.

FAQs

What is the difference between SJF and SRTF?

SJF is non-preemptive: once a process starts, it runs its whole burst. SRTF is preemptive: when a new process arrives with a burst shorter than the running process's remaining time, it takes the CPU. If all processes arrive together, the two produce the same schedule.

Does round robin cause starvation?

No. With n processes in the ready queue and quantum q, every process gets the CPU within (n - 1) x q time units. Starvation is a risk for SJF, SRTF and priority scheduling without aging, because newly arriving jobs can keep jumping ahead of an old one.

Why is SJF optimal but rarely used directly?

Moving a short job ahead of a long one reduces the short job's wait more than it increases the long job's, so SJF minimises average waiting time. The catch is that the OS cannot know the next CPU burst; it has to predict it, usually by exponential averaging of past bursts.

How do I find waiting time from a Gantt chart?

Read each process's completion time from the chart, subtract its arrival time to get turnaround time, then subtract its CPU burst. For a process that ran in several pieces, this automatically counts every gap it spent in the ready queue.

Next step

Drill longer numericals in CPU Scheduling Numericals, move on to Thread Management, return to the Operating Systems MCQ hub, or take a timed NSCT mock test.