CPU Scheduling questions — page 1 of 2

Q64

GATE CS 2026 CS-1SchedulingNAT2 marks
Consider a CPU that has to execute two types of processes. The first type, Actuators (A), requires a CPU burst of 6 seconds. The second type, Controllers (C), requires a CPU burst of 8 seconds. A new process of type A arrives at time t=10,20,30,40,and 50t = 10, 20, 30, 40, \text{and } 50 (in seconds). Similarly, a new process of type C arrives at time t=11,22,33,44,and 55t = 11, 22, 33, 44, \text{and } 55 (in seconds). The CPU scheduling policy is First Come First Serve (FCFS). The first process of type A starts running at t=10t = 10 seconds. The average waiting time (in seconds) for the 10 processes is ___________. (rounded off to one decimal place)
Show answer without attempting

Answer: 9.5

Q23

GATE CS 2026 CS-2SchedulingMCQ1 mark−1/3 if wrong
Which one of the following CPU scheduling algorithms cannot be preemptive?
Show answer without attempting

Answer: B

Q38

GATE CS 2025 CS-1SchedulingMCQ2 marks−2/3 if wrong
A computer has two processors, M1M_1 and M2M_2. Four processes P1,P2,P3,P4P_1, P_2, P_3, P_4 with CPU bursts of 20, 16, 25, and 10 milliseconds, respectively, arrive at the same time and these are the only processes in the system. The scheduler uses non-preemptive priority scheduling, with priorities decided as follows:
- M1M_1 uses priority of execution for the processes as, P1>P3>P2>P4P_1 > P_3 > P_2 > P_4, i.e., P1P_1 and P4P_4 have highest and lowest priorities, respectively.
- M2M_2 uses priority of execution for the processes as, P2>P3>P4>P1P_2 > P_3 > P_4 > P_1, i.e., P2P_2 and P1P_1 have highest and lowest priorities, respectively.
A process PiP_i is scheduled to a processor MkM_k, if the processor is free and no other process PjP_j is waiting with higher priority. At any given point of time, a process can be allocated to any one of the free processors without violating the execution priority rules. Ignore the context switch time. What will be the average waiting time of the processes in milliseconds?
Show answer without attempting

Answer: A

Q26

GATE CS 2025 CS-2SchedulingMCQ1 mark−1/3 if wrong
Processes P1,P2,P3,P4P1, P2, P3, P4 arrive in that order at times 0, 1, 2, and 8 milliseconds respectively, and have execution times of 10, 13, 6, and 9 milliseconds respectively. Shortest Remaining Time First (SRTF) algorithm is used as the CPU scheduling policy. Ignore context switching times.

Which ONE of the following correctly gives the average turnaround time of the four processes in milliseconds?
Show answer without attempting

Answer: D

Q37

GATE CS 2024 CS-2SchedulingMCQ2 marks−2/3 if wrong
Consider a single processor system with four processes A, B, C, and D, represented as given below, where for each process the first value is its arrival time, and the second value is its CPU burst time.

A (0, 10), B (2, 6), C (4, 3), and D (6, 7).

Which one of the following options gives the average waiting times when preemptive Shortest Remaining Time First (SRTF) and Non-Preemptive Shortest Job First (NP-SJF) CPU scheduling algorithms are applied to the processes?
Show answer without attempting

Answer: B

Q27

GATE CS 2023 CSSchedulingMSQ1 mark
Which one or more of the following CPU scheduling algorithms can potentially cause starvation?
More than one option can be correct.
Show answer without attempting

Answer: A, C, D OR C, D

Q42

GATE CS 2022 CSSchedulingMCQ2 marks−2/3 if wrong
Consider four processes PP, QQ, RR, and SS scheduled on a CPU as per round robin algorithm with a time quantum of 4 units. The processes arrive in the order PP, QQ, RR, SS, all at time t=0t = 0. There is exactly one context switch from SS to QQ, exactly one context switch from RR to QQ, and exactly two context switches from QQ to RR. There is no context switch from SS to PP. 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?
Show answer without attempting

Answer: D

Q25

GATE CS 2021 CS-1SchedulingNAT1 mark
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.
Show answer without attempting

Answer: 12

Q14

GATE CS 2021 CS-2SchedulingMSQ1 mark
Which of the following statement(s) is/are correct in the context of CPU scheduling?
More than one option can be correct.
Show answer without attempting

Answer: A, C, D

Q50

GATE CS 2020 CSSchedulingNAT2 marks
Consider the following set of processes, assumed to have arrived at time 0. Consider the CPU scheduling algorithms Shortest Job First (SJF) and Round Robin (RR). For RR, assume that the processes are scheduled in the order P1,P2,P3,P4P_1, P_2, P_3, P_4.
ProcessesP1P_1P2P_2P3P_3P4P_4
Burst time (in ms)8724
If the time quantum for RR is 4 ms, then the absolute value of the difference between the average turnaround times (in ms) of SJF and RR (round off to 2 decimal places) is __________.
Show answer without attempting

Answer: 5.25

Q41

GATE CS 2019 CSSchedulingNAT2 marks
Consider the following four processes with arrival times (in milliseconds) and their length of CPU bursts (in milliseconds) as shown below:
ProcessP1P2P3P4
Arrival time0134
CPU burst time313Z
These processes are run on a single processor using preemptive Shortest Remaining Time First scheduling algorithm. If the average waiting time of the processes is 11 millisecond, then the value of Z is __________.
Show answer without attempting

Answer: 2

Q24

GATE CS 2017 CS-1SchedulingNAT1 mark
Consider the following CPU processes with arrival times (in milliseconds) and length of CPU bursts (in milliseconds) as given below:
ProcessArrival timeBurst time
P107
P233
P355
P462
If the pre-emptive shortest remaining time first scheduling algorithm is used to schedule the processes, then the average waiting time across all processes is ____________ milliseconds.
Show answer without attempting

Answer: 3.0

Q51

GATE CS 2017 CS-2SchedulingNAT2 marks
Consider the set of processes with arrival time (in milliseconds), CPU burst time (in milliseconds), and priority (0 is the highest priority) shown below. None of the processes have I/O burst time.
ProcessArrival TimeBurst TimePriority
P1P_10112
P2P_25280
P3P_31223
P4P_42101
P5P_59164
The average waiting time (in milliseconds) of all the processes using preemptive priority scheduling algorithm is ____________.
Show answer without attempting

Answer: 29.0

Q20

GATE CS 2016 CS-1SchedulingMCQ1 mark−1/3 if wrong
Consider an arbitrary set of CPU-bound processes with unequal CPU burst lengths submitted at the same time to a computer system. Which one of the following process scheduling algorithms would minimize the average waiting time in the ready queue?
Show answer without attempting

Answer: A

Q47

GATE CS 2016 CS-2SchedulingNAT2 marks
Consider the following processes, with the arrival time and the length of the CPU burst given in milliseconds. The scheduling algorithm used is preemptive shortest remaining-time first.
ProcessArrival TimeBurst Time
P1P_1010
P2P_236
P3P_371
P4P_483
The average turn around time of these processes is _________ milliseconds.
Show answer without attempting

Answer: 8.2 to 8.3

Q14

GATE CS 2015 CS-3SchedulingMCQ1 mark−1/3 if wrong
The maximum number of processes that can be in Ready state for a computer system with nn CPUs is
Show answer without attempting

Answer: D

Q57

GATE CS 2015 CS-3SchedulingMCQ2 marks−2/3 if wrong
For the processes listed in the following table, which of the following scheduling schemes will give the lowest average turnaround time?
ProcessArrival TimeProcessing Time
A03
B16
C44
D62
Show answer without attempting

Answer: C

Q52

GATE CS 2015 CS-1SchedulingNAT2 marks
Consider a uniprocessor system executing three tasks T1T_1, T2T_2 and T3T_3, each of which is composed of an infinite sequence of jobs (or instances) which arrive periodically at intervals of 3, 7 and 20 milliseconds, respectively. The priority of each task is the inverse of its period, and the available tasks are scheduled in order of priority, with the highest priority task scheduled first. Each instance of T1T_1, T2T_2 and T3T_3 requires an execution time of 1, 2 and 4 milliseconds, respectively. Given that all tasks initially arrive at the beginning of the 1st millisecond and task preemptions are allowed, the first instance of T3T_3 completes its execution at the end of ________ milliseconds.
Show answer without attempting

Answer: 12

Q32

GATE CS 2014 CS-2SchedulingNAT2 marks
Three processes A, B and C each execute a loop of 100 iterations. In each iteration of the loop, a process performs a single computation that requires tct_c CPU milliseconds and then initiates a single I/O operation that lasts for tiot_{io} milliseconds. It is assumed that the computer where the processes execute has sufficient number of I/O devices and the OS of the computer assigns different I/O devices to each process. Also, the scheduling overhead of the OS is negligible. The processes have the following characteristics:
Process idtct_ctiot_{io}
A100 ms500 ms
B350 ms500 ms
C200 ms500 ms
The processes A, B, and C are started at times 0, 5 and 10 milliseconds respectively, in a pure time sharing system (round robin scheduling) that uses a time slice of 50 milliseconds. The time in milliseconds at which process C would complete its first I/O operation is ___________.
Show answer without attempting

Answer: 1000

Q32

GATE CS 2014 CS-3SchedulingNAT2 marks
An operating system uses shortest remaining time first scheduling algorithm for pre-emptive scheduling of processes. Consider the following set of processes with their arrival times and CPU burst times (in milliseconds):
ProcessArrival TimeBurst Time
P1012
P224
P336
P485
The average waiting time (in milliseconds) of the processes is _________.
Show answer without attempting

Answer: 5.5

0/200 correct0 marks

Related topics in Scheduling