CPU Scheduling: GATE CS Previous Year Questions

CPU Scheduling · Operating System

37 questions · asked in 24 of 27 years (2000–2026)

MCQ 24 · MSQ 2 · NAT 111-mark 21 · 2-mark 16

2000Questions per year2026

Questions 31–35 of 37

Q31GATE 20061 markMCQ−0.33 if wrong
Consider three CPU-intensive processes, which require 10,20 and 30 time units and arrive at times 0,2, and 6, respectively. How many context switches are needed if the operating system implements a shortes remaining time first scheduling algorithm? Do not count the context switches at time zero and at the end

Q32GATE 20051 markMCQ−0.33 if wrong
We wish to schedule three processes P1, P2 and P3 on a uniprocessor system. The priorities, CPU time requirements and arrival times of the processes are as shown below.
ProcessPriorityCPU timeArrival timerequired(hh:mm:ss)P110 (highest)20 sec00:00:05P2910 sec00:00:03P38 (lowest)15 sec00:00:00\begin{array}{|c|c|c|c|} \hline \textbf{Process} & \textbf{Priority} & \textbf{CPU time} & \textbf{Arrival time}\\ & & \textbf{required} & \textbf{(hh:mm:ss)} \\\hline \text{P1} & \text{10 (highest)} & 20\text{ sec} & 00:00:05 \\\hline \text{P2} & 9 & 10 \text{ sec}& 00:00:03 \\\hline \text{P3} & \text{8 (lowest)} & 15 \text{ sec}& 00:00:00 \\\hline \end{array}
We have a choice of preemptive or non-preemptive scheduling. In preemptive scheduling, a late-arriving higher priority process can preempt a currently running process with lower priority. In non-preemptive scheduling, a late-arriving higher priority process must wait for the currently executing process to complete before it can be scheduled on the processor.
What are the turnaround times (time from arrival till completion) of P2 using preemptive and non-preemptive scheduling respectively?

Q33GATE 20041 markMCQ−0.33 if wrong
Consider the following set of processes, with the arrival times and the CPU-burst times given in milliseconds.
Process Arrival time Burst time P1 0 5 P2 1 3 P3 2 3 P4 4 1
What is the average turnaround time for these processes with the preemptive shortest remaining processing time first (SRPT) algorithm?

Q34GATE 20031 markMCQ−0.33 if wrong
A uni-processor computer system only has two processes, both of which alternate 10 ms CPU bursts with 90 ms I/O bursts. Both the processes were created at nearly the same time. The I/O of both processes can proceed in parallel. Which of the following scheduling strategies will result in the least CPU utilizations (over a long period of time) for this system ?

Q35GATE 20021 markMCQ−0.33 if wrong
Which combination of the following features will suffice to characterize an OS as a multi-programmed OS ?

(A)More than one program may be loaded into main memory at the same time for execution.
(B) If a program waits for certain events such as I/O, another program is immediately scheduled for execution.
(C) If the execution of a program terminates, another program is immediately scheduled for execution.

Keep practising

Topics in Operating System

All CS topics ›