A thread may become ready when it is created or when it finishes waiting for an I/O event. True or false?
4 CPU Scheduling Online Quiz Questions
Use this free practice quiz with 20 questions to review 4 CPU Scheduling, test your knowledge, and prepare for your next test or exam.
If a running thread must wait for an I/O event and cannot continue, it becomes .
What performance measure describes the number of jobs completed per unit of time?
Under FCFS, what causes the convoy effect?
- A
It estimates future CPU bursts inaccurately.
- B
A long job at the front of the queue delays many short jobs.
- C
It gives each thread an equal time quantum.
- D
It raises the priority of tasks that have waited a long time.
In Round Robin scheduling, what is a likely trade-off of using a shorter time quantum?
- A
It reduces context switches and always shortens completion times.
- B
It can improve first response but causes more context switches.
- C
It prevents a task from being preempted.
- D
It guarantees that every task meets its deadline.
What technique gradually raises the priority of tasks that have waited a long time, reducing the risk of starvation?
A scheduling policy that always runs the highest-priority ready task guarantees that every deadline will be met. True or false?
- A
True
- B
False
Select all statements that correctly define a scheduling performance measure.
- A
Turnaround time is measured from a job’s arrival until its completion.
- B
Response time is measured from a job’s completion until it next waits for I/O.
- C
Response time is measured from arrival until the job first gets CPU time.
- D
Throughput is measured from arrival until the job first gets CPU time.
Shortest Remaining Time First (SRTF) is the preemptive version of .
In a multilevel feedback queue, how might the scheduler treat tasks that frequently give up the CPU to wait for I/O?
- A
Move them to the lowest-priority queue because they use little CPU.
- B
Keep them out of all queues until their I/O finishes.
- C
Favor them in a way that supports responsiveness.
- D
Give them the longest CPU bursts so they finish sooner.
A job arrives at time 6 and completes at time 14. What is its turnaround time? Enter your answer in time units.
Select all statements about fair-share scheduling that are supported by the material.
- A
A fair scheduler may account for task weights or groups.
- B
Fair-share scheduling requires every task to receive exactly the same CPU time.
- C
EEVDF considers a task’s fair share and a virtual deadline.
- D
EEVDF selects tasks using only their expected CPU burst lengths.
Explain why no single CPU scheduling policy is best for every workload. Contrast one priority of interactive systems with one priority of batch systems, and identify one trade-off a scheduler designer may need to manage.
A job arrives at time 3 and completes at time 11. Using completion time minus arrival time, what is its turnaround time?
- A
7 time units
- B
8 time units
- C
11 time units
- D
14 time units
A running thread blocks while waiting for I/O, and another thread is ready. What can the scheduler do to keep the processor productive?
- A
Keep the processor idle until the blocked thread resumes
- B
Restart the blocked thread immediately
- C
Run another ready thread
- D
Move every waiting thread to the front of the queue
Under FCFS, a 9-unit job arrives before jobs requiring 1 and 2 units. If all are ready, what scheduling problem can occur for the shorter jobs?
- A
The short jobs run first because they require less CPU time
- B
The short jobs wait behind the long job, producing the convoy effect
- C
The scheduler interrupts the long job after each time quantum
- D
The long job is postponed until all short jobs finish
Three jobs are ready at the same time, with known CPU bursts of 6, 2, and 4 units. Under non-preemptive SJF, which job runs first?
- A
The job requiring 6 units
- B
The job requiring 4 units
- C
The job requiring 2 units
- D
The job that arrived most recently
In Round Robin scheduling, what is the usual trade-off when the time quantum is made shorter?
- A
First response generally improves, and context switches increase
- B
First response worsens, and context switches decrease
- C
Turnaround time is guaranteed to decrease, with no change in overhead
- D
Starvation is eliminated, and context switches decrease
A scheduler may interrupt a running job whenever a new job becomes ready, then run whichever job has the shortest remaining expected CPU time. What algorithm is this?
True or false: In a preemptive operating system, the scheduler can interrupt a running thread and switch to another thread even if the running thread has not blocked or finished.
- A
True
- B
False