• retagged by
24,054 views
55 55 votes

Which of the following statement(s) is/are correct in the context of $\text{CPU}$ scheduling?

  1. Turnaround time includes waiting time
  2. The goal is to only maximize $\text{CPU}$ utilization and minimize throughput
  3. Round-robin policy can be used even when the $\text{CPU}$ time required by each of the processes is not known apriori
  4. Implementing preemptive scheduling needs hardware support

3 Answers

Best answer
75 75 votes
  1. Turnaround time includes waiting time
    • TRUE. $\text{Turnaround Time} = \text{Waiting Time} + \text{Burst Time}$
  2. The goal is to only maximize CPU utilization and minimize throughput
    • FALSE. CPU scheduling must aim to maximize CPU utilization as well as throughput. Throughput of CPU scheduling is defined as the number of processes completed in unit time. $\textsf{SJF}$ scheduling gives the highest throughput. 
  3. Round-robin policy can be used even when the CPU time required by each of the processes is not known apriori
    • TRUE. Round-robin scheduling gives a fixed time quantum to each process and for this there is no requirement to know the CPU time of the process apriori (which is not the case say for shortest remaining time first).
  4. Implementing preemptive scheduling needs hardware support
    • TRUE. Preemptive scheduling needs hardware support to manage context switch which includes saving the execution state of the current process and then loading the next process.

Correct Answer: A;C;D

Reference: Stanford Notes

• selected by
11 11 votes
Ans. A,C and D
A. turnaround time =completion time(burst+waiting)-arrival time.
B. The goal is to maximize throughput not to minimize it.
C. Round Robin is used in modern day systems as it doesn’t requires the information about the CPU time for processes rather it works just by providing same time quanta to every process.
D. Hardware support is essential for preemption.
0 0 votes

Option A is correct because Turnaround Time is the total time a process spends in the system from start to finish. It is calculated as $\text{Turnaround Time} = \text{Burst Time} + \text{Waiting Time}$, so it naturally includes the waiting time.

Option B is incorrect because a good operating system wants to get as much work done as possible. Therefore, the goal is to maximize throughput (finish more processes), not minimize it.

Option C is correct because Round-Robin doesn't care how long a process will take. It simply gives every process a fixed slice of time (time quantum) and moves to the next one, making it perfect for systems where we don't know the execution times in advance.

Option D is correct because to stop a running process forcefully (preemption), the system needs a built-in hardware timer. This timer counts down and triggers a physical hardware interrupt to hand control back to the OS.

Correct Options: A, C, and D

Answer:
Position:
Show:

Related questions

72 72 votes
5 answers 5 answers
24.6k
24.6k views
Arjun asked Feb 18, 2021
24,563 views
​​​​​​Consider the following multi-threaded code segment (in a mix of C and pseudo-code), invoked by two processes $P_1$ and $P_2$, and each of the processes spawns two t...
86 86 votes
9 answers 9 answers
27.6k
27.6k views
Arjun asked Feb 18, 2021
27,617 views
Consider a computer system with multiple shared resource types, with one instance per resource type. Each instance can be owned by only one process at a time. Owning and ...
58 58 votes
7 answers 7 answers
14.2k
14.2k views
Arjun asked Feb 18, 2021
14,209 views
Consider the following sets, where $n \geq 2$:$S_1$: Set of all $n \times n$ matrices with entries from the set $\{ a, b, c\}$$S_2$: Set of all functions from the set $\{...
44 44 votes
3 answers 3 answers
21.7k
21.7k views
Arjun asked Feb 18, 2021
21,697 views
Let $L_1$ be a regular language and $L_2$ be a context-free language. Which of the following languages is/are context-free?$L_1 \cap \overline{L_2}$$\overline{\overline{L...