CPU Scheduling # MCQs Practice set

Q.1 Which of the following is a non-preemptive scheduling algorithm?

Round Robin
Shortest Job Next (SJN)
Priority Preemptive
Multilevel Queue
Explanation - SJN is non-preemptive because once a process starts execution, it runs until completion.
Correct answer is: Shortest Job Next (SJN)

Q.2 In Round Robin scheduling, the main parameter that affects performance is:

Arrival time
Time quantum
Priority
Burst time
Explanation - The time quantum determines how long each process runs before being preempted.
Correct answer is: Time quantum

Q.3 Which scheduling algorithm may cause starvation of processes?

Round Robin
First Come First Serve (FCFS)
Priority Scheduling
Shortest Remaining Time First (SRTF)
Explanation - Low-priority processes may never execute if higher-priority ones keep arriving.
Correct answer is: Priority Scheduling

Q.4 What is the main advantage of Shortest Job First (SJF) scheduling?

Minimizes turnaround time
Avoids starvation
Provides fairness
Supports real-time systems
Explanation - SJF provides the optimal average turnaround time among scheduling algorithms.
Correct answer is: Minimizes turnaround time

Q.5 In FCFS scheduling, processes are served in the order of:

Burst time
Priority
Arrival time
Deadline
Explanation - FCFS is based on the order processes arrive in the ready queue.
Correct answer is: Arrival time

Q.6 Which of the following is preemptive?

FCFS
SJF
SRTF
Priority (non-preemptive)
Explanation - SRTF preempts the currently running process if a new one with a shorter burst time arrives.
Correct answer is: SRTF

Q.7 Time quantum in Round Robin should be:

Very small
Very large
Neither too small nor too large
Equal to average burst time
Explanation - A balance is needed to avoid too many context switches (small) or unfair delays (large).
Correct answer is: Neither too small nor too large

Q.8 Which algorithm is best suited for interactive systems?

FCFS
SJF
Round Robin
Priority Scheduling
Explanation - Round Robin provides time-sharing and fairness, suitable for interactive environments.
Correct answer is: Round Robin

Q.9 The criteria 'response time' is most important for:

Batch systems
Real-time systems
Interactive systems
Embedded systems
Explanation - Response time determines how quickly users see a reaction, which is crucial for interactive systems.
Correct answer is: Interactive systems

Q.10 Which of the following scheduling algorithms can lead to convoy effect?

FCFS
SJF
Round Robin
Priority Scheduling
Explanation - Convoy effect happens when a long job delays all shorter ones in FCFS.
Correct answer is: FCFS

Q.11 What is the main disadvantage of SJF scheduling?

Convoy effect
Requires knowledge of burst time
Not fair to all processes
High response time
Explanation - SJF needs accurate burst time predictions, which are difficult in practice.
Correct answer is: Requires knowledge of burst time

Q.12 Which of the following is used in real-time systems?

FCFS
Round Robin
Priority Scheduling
SJF
Explanation - Real-time systems use priorities to ensure critical tasks meet deadlines.
Correct answer is: Priority Scheduling

Q.13 In SRTF scheduling, a process can be preempted when:

A process with shorter burst arrives
A higher priority process arrives
The process completes
Time quantum expires
Explanation - SRTF preempts the running process if a new process with smaller remaining burst arrives.
Correct answer is: A process with shorter burst arrives

Q.14 Which is the simplest CPU scheduling algorithm?

FCFS
SJF
Round Robin
Priority
Explanation - FCFS is straightforward as processes are scheduled in arrival order.
Correct answer is: FCFS

Q.15 The process of switching CPU from one process to another is called:

Context switch
Deadlock
Starvation
Paging
Explanation - A context switch occurs when CPU control moves between processes.
Correct answer is: Context switch

Q.16 Which criterion is optimized by SJF?

Throughput
Turnaround time
Response time
Fairness
Explanation - SJF minimizes the average turnaround time of processes.
Correct answer is: Turnaround time

Q.17 Which of the following is not a CPU scheduling criterion?

Turnaround time
Waiting time
Response time
Page fault rate
Explanation - Page fault rate relates to memory management, not CPU scheduling.
Correct answer is: Page fault rate

Q.18 In multilevel queue scheduling, processes are classified based on:

Arrival time
Burst time
Priority and type
Deadline
Explanation - Multilevel queues separate system, interactive, and batch processes by type and priority.
Correct answer is: Priority and type

Q.19 Aging is a technique to:

Reduce response time
Prevent starvation
Increase throughput
Reduce turnaround time
Explanation - Aging gradually increases the priority of waiting processes, avoiding starvation.
Correct answer is: Prevent starvation

Q.20 In priority scheduling, two processes with the same priority are scheduled by:

FCFS
SJF
Random selection
Round Robin
Explanation - Among equal priorities, FCFS is usually used to break ties.
Correct answer is: FCFS

Q.21 What is turnaround time?

Waiting time + burst time
Arrival time - completion time
Burst time only
Response time + waiting time
Explanation - Turnaround time is the total time from process arrival to completion.
Correct answer is: Waiting time + burst time

Q.22 Which of the following algorithms is fair to all processes?

SJF
Priority Scheduling
Round Robin
FCFS
Explanation - Round Robin gives each process equal share of CPU time, ensuring fairness.
Correct answer is: Round Robin

Q.23 Throughput is defined as:

Number of processes completed per unit time
Average waiting time
Average turnaround time
CPU utilization
Explanation - Throughput measures system productivity in terms of completed processes.
Correct answer is: Number of processes completed per unit time

Q.24 Response time is defined as:

Time from submission to completion
Time from submission to first response
Waiting time + turnaround time
Time quantum assigned
Explanation - Response time measures the delay before the first output of a process.
Correct answer is: Time from submission to first response

Q.25 Which CPU scheduling algorithm is used by most modern operating systems?

FCFS
SJF
Round Robin with Priority
Shortest Remaining Time First
Explanation - Most systems combine round robin with priority scheduling to balance responsiveness and efficiency.
Correct answer is: Round Robin with Priority