Which of the following statement(s) is/are correct in the context of CPU…
2021
Which of the following statement(s) is/are correct in the context of CPU scheduling?
- A.
Turnaround time includes waiting time
- B.
The goal is to only maximize CPU utilization and minimize throughput
- C.
Round-robin policy can be used even when the CPU time required by each of the processes is not known apriori
- D.
Implementing preemptive scheduling needs hardware support
Attempted by 209 students.
Show answer & explanation
Correct answer: A, C, D
Final answer: The correct statements are: Turnaround time includes waiting time; Round-robin policy can be used even when the CPU time required by each process is not known apriori; Implementing preemptive scheduling needs hardware support.
The other statement claiming that the goal is to only maximize CPU utilization and minimize throughput is incorrect.
Turnaround time includes waiting time: Turnaround time = completion time − arrival time. It represents the total time a process spends in the system, which includes waiting in the ready queue as well as CPU execution and any I/O, so waiting time is a component of turnaround time.
Round-robin does not require prior knowledge of CPU burst times: Round-robin uses a fixed time quantum and cycles through the ready queue, preempting processes after each quantum. It does not rely on knowing how long each process will run in advance, making it suitable when burst times are unknown.
Preemptive scheduling requires hardware support: Implementing preemption requires hardware features such as a programmable timer and interrupt mechanism so the OS can interrupt a running process and perform a context switch to another process. Without such hardware interrupts, true preemption cannot be enforced.
Why the remaining statement is wrong: Scheduling objectives include maximizing CPU utilization and maximizing throughput, while minimizing turnaround time, waiting time, and response time. Saying to minimize throughput is the opposite of the usual goal.
A video solution is available for this question — log in and enroll to watch it.