HomeSubjectsUniversityBlogAbout

CPU Scheduling

Topic in Operating Systems

210 total MCQsShowing 30 with explanations10 Easy10 Medium10 Hard

About This Topic

CPU scheduling is the kernel's policy for choosing which ready process runs next, balancing utilisation, throughput, waiting time and response time. Numerical questions give arrival and burst times and ask you to draw a Gantt chart, then compute average waiting or turnaround time under FCFS, SJF, SRTF, priority or Round Robin. Be ready to explain why SJF is optimal for average waiting time, how a large time quantum makes Round Robin behave like FCFS, and how aging cures starvation. The convoy effect, preemptive versus non-preemptive dispatch, multilevel feedback queues, processor affinity, and real-time policies such as Rate Monotonic and EDF also come up.

Below are 30 practice questions from a pool of 210 CPU Scheduling MCQs, one of 12 topics in Operating Systems. Each shows the correct answer with an explanation; when you are ready, take a timed quiz to test recall under exam conditions.

Practice Questions

Each question below shows the correct answer with a full explanation. Use these to build conceptual understanding before attempting a timed quiz.

CPU SchedulingEasy

Q1. CPU scheduling decides:

  1. A.How much memory to allocate to each process
  2. B.Which ready process gets the CPU execution next✓ Correct
  3. C.Which files to open for the running processes
  4. D.Which device to use for the I/O operations

Explanation

CPU scheduling is the task of selecting a process from the ready queue and allocating the CPU to it, determining the order and duration of process execution.

Report an error in this question

CPU SchedulingEasy

Q2. In First-Come, First-Served (FCFS) scheduling, processes are executed:

  1. A.In the order they arrive in the queue✓ Correct
  2. B.Based on their assigned priority level
  3. C.With the shortest job running first
  4. D.Randomly without any specific order

Explanation

FCFS scheduling executes processes in the order they arrive in the ready queue. It is the simplest scheduling algorithm but can lead to the convoy effect.

Report an error in this question

CPU SchedulingEasy

Q3. Turnaround time of a process is defined as:

  1. A.Total time from submission to completion of process✓ Correct
  2. B.Time the process spends waiting in the ready queue
  3. C.Time spent performing input and output operations
  4. D.Time the CPU is busy executing process instructions

Explanation

Turnaround time is the total elapsed time from when a process is submitted until it is completed, including waiting time, execution time, and I/O time.

Report an error in this question

CPU SchedulingEasy

Q4. Waiting time of a process is:

  1. A.The total time from arrival to completion
  2. B.The time spent waiting in the ready queue✓ Correct
  3. C.The time spent in I/O operations
  4. D.The time spent executing on the CPU

Explanation

Waiting time is the total time a process spends waiting in the ready queue before getting CPU time. CPU scheduling aims to minimize the average waiting time.

Report an error in this question

CPU SchedulingEasy

Q5. Round Robin scheduling uses:

  1. A.Random process allocation
  2. B.Longest job first execution
  3. C.A fixed time quantum per process✓ Correct
  4. D.Priority-based CPU allocation

Explanation

Round Robin scheduling assigns a fixed time quantum (time slice) to each process. If a process doesn't finish within its quantum, it is preempted and moved to the back of the ready queue.

Report an error in this question

CPU SchedulingEasy

Q6. Preemptive scheduling means:

  1. A.The OS can interrupt and reassign the CPU to another✓ Correct
  2. B.Processes schedule themselves without any OS control
  3. C.Only one process can ever run at a time on the CPU
  4. D.A process always runs until it completes execution

Explanation

In preemptive scheduling, the OS can interrupt a currently running process and move it to the ready queue to allocate the CPU to another process based on some scheduling criteria.

Report an error in this question

CPU SchedulingEasy

Q7. Non-preemptive scheduling means:

  1. A.The CPU can be taken away from a running process at any time
  2. B.Once a process starts, it runs until it finishes or blocks✓ Correct
  3. C.The scheduler never runs and the CPU sits idle indefinitely
  4. D.Multiple processes share the CPU at the same exact instant

Explanation

In non-preemptive scheduling, once the CPU is allocated to a process, the process keeps it until it terminates or voluntarily moves to the waiting state (e.g., for I/O).

Report an error in this question

CPU SchedulingEasy

Q8. Which scheduling algorithm gives the minimum average waiting time for a given set of processes?

  1. A.First-Come First-Served
  2. B.Priority Scheduling
  3. C.Shortest Job First SJF✓ Correct
  4. D.Round Robin scheduling

Explanation

SJF (Shortest Job First) scheduling is proven to give the minimum average waiting time among all scheduling algorithms for a given set of processes.

Report an error in this question

CPU SchedulingEasy

Q9. The dispatcher is responsible for:

  1. A.Selecting the next process to execute on CPU
  2. B.Managing main memory allocation for process
  3. C.Giving control of CPU to the selected process✓ Correct
  4. D.Handling file system operations for process

Explanation

The dispatcher gives control of the CPU to the process selected by the short-term scheduler. It performs context switching, switching to user mode, and jumping to the proper location in the program.

Report an error in this question

CPU SchedulingEasy

Q10. CPU utilization refers to:

  1. A.The number of processes completed per unit time
  2. B.The number of context switches performed per second
  3. C.The percentage of time the CPU is busy executing✓ Correct
  4. D.The total time a process waits in the ready queue

Explanation

CPU utilization measures the percentage of time the CPU is actively executing processes rather than being idle. Higher CPU utilization generally indicates better system performance.

Report an error in this question

CPU SchedulingMedium

Q11. What is the convoy effect in FCFS scheduling?

  1. A.Processes are grouped into convoys for batch runs
  2. B.Short processes wait for long ones, raising wait time✓ Correct
  3. C.CPU utilization increases dramatically and suddenly
  4. D.All processes finish at exactly the same time

Explanation

The convoy effect occurs in FCFS when a long CPU-bound process holds the CPU, causing all shorter processes to wait, resulting in high average waiting time and low CPU/device utilization.

Report an error in this question

CPU SchedulingMedium

Q12. In Shortest Remaining Time First (SRTF) scheduling, what happens when a new process arrives?

  1. A.The current process is always preempted regardless of timing
  2. B.The new process always waits until the current one completes
  3. C.The scheduler compares remaining times and preempts if shorter✓ Correct
  4. D.The new process automatically gets the highest priority level

Explanation

SRTF is the preemptive version of SJF. When a new process arrives, if its burst time is shorter than the remaining burst time of the currently executing process, the current process is preempted.

Report an error in this question

CPU SchedulingMedium

Q13. What is starvation in the context of CPU scheduling?

  1. A.A process running completely out of allocated memory
  2. B.A process consuming too much CPU time from the system
  3. C.A deadlock situation between two or more blocked tasks
  4. D.A low-priority process waiting indefinitely for the CPU✓ Correct

Explanation

Starvation occurs when a low-priority process waits indefinitely because higher-priority processes continuously preempt it. It is a significant problem in priority scheduling.

Report an error in this question

CPU SchedulingMedium

Q14. Aging is a technique used to:

  1. A.Track how long each process has been running on the CPU
  2. B.Increase process priority over time to prevent starvation✓ Correct
  3. C.Decrease the priority of a process as it runs much longer
  4. D.Remove old processes from the system to free up resources

Explanation

Aging gradually increases the priority of processes that have been waiting for a long time, ensuring that even low-priority processes will eventually execute and preventing starvation.

Report an error in this question

CPU SchedulingMedium

Q15. If the time quantum in Round Robin is very large, it behaves like:

  1. A.Multilevel queues
  2. B.Priority scheduling
  3. C.SJF scheduling
  4. D.FCFS scheduling✓ Correct

Explanation

If the time quantum in Round Robin is very large (larger than the longest burst), each process finishes within its first quantum, making it behave identically to FCFS scheduling.

Report an error in this question

CPU SchedulingMedium

Q16. If the time quantum in Round Robin is very small, what problem occurs?

  1. A.Excessive switching✓ Correct
  2. B.System deadlocking
  3. C.Memory overflowing
  4. D.Process starvation

Explanation

A very small time quantum causes excessive context switches, where the overhead of saving and restoring process states becomes significant relative to actual computation time.

Report an error in this question

CPU SchedulingMedium

Q17. In Multilevel Queue Scheduling, processes are:

  1. A.Permanently assigned to queues by type✓ Correct
  2. B.All placed in one single queue
  3. C.Moved between queues based on priority
  4. D.Randomly assigned to available queues

Explanation

In Multilevel Queue Scheduling, processes are permanently assigned to specific queues (e.g., foreground interactive vs. background batch) based on their properties. Each queue can have its own scheduling algorithm.

Report an error in this question

CPU SchedulingMedium

Q18. What distinguishes Multilevel Feedback Queue from Multilevel Queue scheduling?

  1. A.It only uses the Round Robin algorithm
  2. B.Processes can move between queues by behavior✓ Correct
  3. C.It does not support priority scheduling
  4. D.It uses fewer scheduling queues overall

Explanation

Multilevel Feedback Queue allows processes to move between queues based on their CPU burst behavior. CPU-bound processes are demoted to lower-priority queues, while I/O-bound processes may be promoted.

Report an error in this question

CPU SchedulingMedium

Q19. Dispatch latency is:

  1. A.The time a process waits in the ready queue
  2. B.The time between two consecutive CPU interrupts
  3. C.The time to stop one process and start another✓ Correct
  4. D.The total execution time of a single process

Explanation

Dispatch latency is the time the dispatcher takes to stop the currently running process and start the execution of the selected process. It should be minimized for better system responsiveness.

Report an error in this question

CPU SchedulingMedium

Q20. Response time in scheduling is defined as:

  1. A.The time between two context switches
  2. B.The time to complete all system processes
  3. C.The total CPU execution time of process
  4. D.Time from submission until first response✓ Correct

Explanation

Response time is the time from submission of a request until the first response is produced (not the total output time). It is an important metric for interactive systems.

Report an error in this question

CPU SchedulingHard

Q21. In the Completely Fair Scheduler (CFS) used by Linux, how is CPU time allocated?

  1. A.Based only on arrival time of each process
  2. B.Based on vruntime, picking the smallest vruntime✓ Correct
  3. C.Using fixed time quanta for all processes equally
  4. D.Using strict static priority scheduling for all

Explanation

CFS allocates CPU time based on virtual runtime (vruntime). It uses a red-black tree to select the process with the smallest vruntime, ensuring fair CPU distribution proportional to process weight/priority.

Report an error in this question

CPU SchedulingHard

Q22. What is the problem with using SJF in practice?

  1. A.Next burst length is unknown and must be estimated✓ Correct
  2. B.It always causes deadlock among the running tasks
  3. C.It is far too slow for practical use
  4. D.It does not support multitasking at all in practice

Explanation

SJF requires knowledge of the next CPU burst length, which is unknown in advance. In practice, it must be estimated using techniques like exponential averaging of previous burst lengths.

Report an error in this question

CPU SchedulingHard

Q23. In exponential averaging for SJF burst prediction, the formula is τ(n+1) = α * t(n) + (1-α) * τ(n). What happens when α = 0?

  1. A.Only the most recent actual burst is considered here
  2. B.All previous burst lengths are weighted equally here
  3. C.Recent history has no effect; uses initial estimate only✓ Correct
  4. D.The prediction always becomes zero in all situations

Explanation

When α = 0, the formula becomes τ(n+1) = τ(n), meaning the recent actual burst t(n) is ignored and the prediction never changes from the initial estimate.

Report an error in this question

CPU SchedulingHard

Q24. In multiprocessor scheduling, what is processor affinity?

  1. A.Keeping a process on the same processor for cache✓ Correct
  2. B.The clock speed of a specific processor core
  3. C.The power consumption of a specific processor
  4. D.The total number of processors in the system

Explanation

Processor affinity refers to keeping a process on the same processor to take advantage of data already in that processor's cache. Soft affinity attempts this but allows migration; hard affinity prohibits migration.

Report an error in this question

CPU SchedulingHard

Q25. What is load balancing in multiprocessor scheduling?

  1. A.Dividing a single process into equal-sized parts
  2. B.Running all processes on a single CPU processor
  3. C.Reducing the CPU clock speed to save energy
  4. D.Distributing workload evenly across all processors✓ Correct

Explanation

Load balancing distributes workload evenly across all available processors. It can be done via push migration (moving processes from overloaded to idle processors) or pull migration (idle processors taking work).

Report an error in this question

CPU SchedulingHard

Q26. What is the difference between asymmetric and symmetric multiprocessing scheduling?

  1. A.Asymmetric uses more processors than symmetric
  2. B.They are identical in behavior and design
  3. C.Symmetric is always faster than asymmetric mode
  4. D.Asymmetric has one master; symmetric self-schedules✓ Correct

Explanation

In asymmetric multiprocessing, a single master processor handles all scheduling decisions. In symmetric multiprocessing (SMP), each processor is self-scheduling, selecting processes from a common or per-processor queue.

Report an error in this question

CPU SchedulingHard

Q27. In real-time CPU scheduling, what is the difference between rate-monotonic and earliest-deadline-first (EDF) scheduling?

  1. A.Rate-monotonic is non-preemptive; EDF is preemptive
  2. B.Rate-monotonic uses fixed priority; EDF uses deadlines✓ Correct
  3. C.EDF uses fixed priority; rate-monotonic uses dynamic
  4. D.They are identical algorithms for real-time systems

Explanation

Rate-monotonic assigns fixed priorities inversely proportional to period (shorter period = higher priority). EDF dynamically assigns the highest priority to the process with the earliest deadline. EDF can achieve higher CPU utilization.

Report an error in this question

CPU SchedulingHard

Q28. What is the maximum CPU utilization bound for rate-monotonic scheduling with n processes?

  1. A.Always exactly 75% utilization
  2. B.Always 100% utilization
  3. C.Always exactly 50% utilization
  4. D.n(2^(1/n)-1), approaches ~69.3%✓ Correct

Explanation

For rate-monotonic scheduling, the utilization bound is n(2^(1/n) - 1). As n approaches infinity, this converges to ln(2) ≈ 69.3%. If total utilization exceeds this, schedulability is not guaranteed.

Report an error in this question

CPU SchedulingHard

Q29. What is NUMA-aware scheduling?

  1. A.Scheduling that ignores all memory placement
  2. B.Scheduling based on network usage patterns
  3. C.A scheduling algorithm for non-uniform CPUs
  4. D.Placing processes near their memory for speed✓ Correct

Explanation

NUMA-aware scheduling considers the Non-Uniform Memory Access architecture where memory access time depends on location relative to a processor. It places processes on CPUs closest to their allocated memory for optimal performance.

Report an error in this question

CPU SchedulingHard

Q30. What is proportional share scheduling?

  1. A.Strict priority-based scheduling approach
  2. B.Scheduling based on memory usage amounts
  3. C.CPU time proportional to allocated shares✓ Correct
  4. D.Equal CPU time for all running processes

Explanation

Proportional share scheduling allocates CPU time in proportion to shares assigned to each process. Lottery scheduling randomly selects based on tickets held; stride scheduling deterministically allocates based on computed strides.

Report an error in this question

Ready to test yourself on CPU Scheduling?

Take a timed quiz drawn from 210+ questions on this topic. No signup required — your progress saves in your browser.

Start CPU Scheduling Quiz