# CPU Scheduling

 Question 1
Which one or more of the following CPU scheduling algorithms can potentially cause starvation?
 A First-in First-Out B Round Robin C Priority Scheduling D Shortest Job First
GATE CSE 2023   Operating System
Question 1 Explanation:
 Question 2
Consider four processes P, Q, R, and S scheduled on a CPU as per round robin algorithm with a time quantum of 4 units. The processes arrive in the order P, Q, R, S, all at time t = 0. There is exactly one context switch from S to Q, exactly one context switch from R to Q, and exactly two context switches from Q to R. There is no context switch from S to P. Switching to a ready process after the termination of another process is also considered a context switch. Which one of the following is NOT possible as CPU burst time (in time units) of these processes?
 A P = 4, Q = 10, R = 6, S = 2 B P = 2, Q = 9, R = 5, S = 1 C P = 4, Q = 12, R = 5, S = 4 D P = 3, Q = 7, R = 7, S = 3
GATE CSE 2022   Operating System
Question 2 Explanation:

 Question 3
Which of the following statement(s) is/are correct in the context of CPU scheduling?
[MSQ]
 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
GATE CSE 2021 SET-2   Operating System
Question 3 Explanation:
 Question 4
Three processes arrive at time zero with CPU bursts of 16, 20 and 10 milliseconds. If the scheduler has prior knowledge about the length of the CPU bursts, the minimum achievable average waiting time for these three processes in a non-preemptive scheduler (rounded to nearest integer) is _____________ milliseconds.
 A 18.66 B 12 C 15 D 9
GATE CSE 2021 SET-1   Operating System
Question 4 Explanation:
 Question 5
Three CPU-bound tasks, with execution times of 15, 12 and 5 time units respectively arrive at times 0, t and 8, respectively. If the operating system implements a shortest remaining time first scheduling algorithm, what should be the value of t to have 4 context switches? Ignore the context switches at time 0 and at the end.
 A 0 < t < 3 B t=0 C t <= 3 D 3 < t < 8
ISRO CSE 2020   Operating System
Question 5 Explanation:

There are 5 questions to complete.

### 7 thoughts on “CPU Scheduling”

1. Thankyou boss

2. Q 20 has a wrong diagram…please update it

3. Q21 wrong diagram pls update it 🙂

4. Qn 26 answer should be option D i. E., P2, P3, P1

• 5. • 