1. CPU SCHEDULING
1. Which of the following scheduling algorithms is non-preemptive?
a. Round Robin
b. First-in-First-Out
c. Multilevel Queue Scheduling
d. Multilevel Queue Scheduling with Feedback
2. Time quantum can be said
a. Multilevel queue scheduling algorithm
b. Round-robin scheduling algorithm
c. Shortest job scheduling algorithm
d. Priority scheduling algorithm
3. Which module gives control of the CPU to the process selected by the short-term
scheduler?
a. Schedular
b. Dispatcher
c. Interrupt
d. None of the above
4. Which of the following statements are true?
I. Shortest remaining time first scheduling may cause starvation
II. Preemptive scheduling may cause starvation
III. Round robin is better than FCFS in terms of response time
a. I only b. I and III only c. II and III only d. I, II and III
5. Which of the following process scheduling algorithm may lead to starvation
a. FIFO
b. Round Robin
2. c. Shortest Job Next
d. None of the above
6. If the quantum time of round robin algorithm is very large, then it is equivalent to:
a. First in First Out
b. Shortest Job Next
c. Lottery Scheduling
d. None of the above
7. In which of the following scheduling criteria, context switching will never take place ?
a. Round Robin
b. Pre-emptive SJF
c. Non pre-emptive SJF
d. Pre-emptive priority
8. Consider the following three processes with the arrival time and CPU burst time given in
milliseconds:
Process Arrival Time Burst Time
P1 0 7
P2 1 4
P3 2 8
Give the Gantt Chart for pre-emptive SJF.
9. When an interrupt occurs, an operating system.
a. ignores the interrupt
b. always changes state of interrupted process to 'blocked' and schedules another process
c. always resumes execution of interrupted process after processing the interrupt
d. may change the state of interrupted process to 'blocked'and schedule another process
3. 10. Which of the following can not be scheduled by the kernel?
a. Process
b. User-level thread
c. Kernel-level thread
d. None of the above
11. Consider a set of n tasks with known runtimes r1, r2, .... rn to be run on a uniprocessor
machine. Which of the following processor scheduling algorithms will result in the maximum
throughput?
a. Round-Robin
b. Shortest-Job-First
c. Highest-Response-Ratio-Next
d. First-Come-First-Served
12. Selects the statements which are true
i. starvation may be caused by Shortest remaining time first scheduling.
ii. starvation may be caused by Preemptive scheduling.
iii. in terms of response time, Round robin is better than FCFS.
a. all the given option
b. i only
c. ii and iii only
d. i and iii only
13. A CPU-scheduling algorithm determines an order for the execution of its scheduled
processes. Given n processes to be scheduled on one processor, how many different
schedules are possible? Give a formula in terms of n.
14. Which scheduling policy is most suitable for a time-shared operating systems?
a. Shortest Job First
b. Round Robin
4. c. First Come First Server
d. Elevator
15. An operating system uses
emptive scheduling of processes. Consider the following set of processes with their arrival
times and CPU burst times (in milliseconds):
Process Arrival Time Burst Time
P1 0
P2 2
P3 3
P4 8
The average waiting time (in milliseconds) of the processes is _________.
16. Consider the following set of processes, assumed to have
CPU scheduling algorithms Shortest Job First (SJF) and Round Robin (RR). For RR, assume
that the processes are scheduled in the order P
If the time quantum for RR is 4 ms, then the absolute value of the
average turnaround times (in ms) of SJF and RR (round off to 2 decimal places) is ________
a. 5.0
b. 5.25
c. 5.50
d. 5.75
17. Consider the following four processes with arrival times (in milliseconds) and their
length of CPU burst (
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):
Burst Time
12
2 4
6
5
The average waiting time (in milliseconds) of the processes is _________.
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, P4.
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 ________
Consider the following four processes with arrival times (in milliseconds) and their
length of CPU burst (in milliseconds) as shown below:
scheduling algorithm for pre-
emptive scheduling of processes. Consider the following set of processes with their arrival
arrived at time 0. Consider the
CPU scheduling algorithms Shortest Job First (SJF) and Round Robin (RR). For RR, assume
difference between the
average turnaround times (in ms) of SJF and RR (round off to 2 decimal places) is ________.
Consider the following four processes with arrival times (in milliseconds) and their
in milliseconds) as shown below:
5. 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 1 millisecond, then
the value of Z is __________.
a. 2
b. 3
c. 1
d. 4
18. The Correct matching of the following pairs is
(A) Disk check (1) Round robin
(B) Batch Processing (2) Scan
(C)Time Sharing (3) LIFO
(D) Stack operation (4) FIFO
a. A-3,B-4,C-2,D-1
b. A-4,B-3,C-2,D-1
c. A-3,B-4,C-1,D-2
d. A-2,B-4,C-1,D-3
19. A scheduling algorithm assigns priority proportional to the waiting time of a process.
Every process starts with priority zero (the lowest priority). The scheduler re-evaluates the
process priorities every T time units and decides the next process to schedule. Which one of
the following is TRUE if the processes have no I/O operations and all arrive at time zero?
a. This algorithm is equivalent to the first-come-first-serve algorithm.
b. This algorithm is equivalent to the round-robin algorithm.
c. This algorithm is equivalent to the shortest-job-first algorithm.
d. This algorithm is equivalent to the shortest-remaining-time-first algorithm.
20. Consider a disk system with 100 cylinders. The requests to access the cylinders occur in
following sequence: 4, 34, 10, 7, 19, 73, 2, 15, 6, 20 Assuming that the head is currently at
cylinder 50, what is the time taken to satisfy all requests if it takes 1ms to move from one
cylinder to adjacent one and shortest seek time first policy is used?
6. a. 95 ms
b. 119 ms
c. 233 ms
d. 276 ms
21. A scheduling algorithm assigns priority proportional to the waiting time of a process.
Every process starts with priority zero (the lowest priority). The scheduler re-evaluates the
process priorities every T time units and decides the next process to schedule. Which one of
the following is TRUE if the processes have no I/O operations and all arrive at time zero?
a. This algorithm is equivalent to the first-come-first-serve algorithm
b. This algorithm is equivalent to the shortest-job-first algorithm.
c. This algorithm is equivalent to the round-robin algorithm.
d. This algorithm is equivalent to the shortest-remaining-time-first algorithm.
22. Consider the following processes, with the arrival time and the length of the CPU burst
given in milliseconds. The scheduling algorithm used is pre-emptive shortest remaining-time
first.
ProcessArrival TimeBurst Time
P1 0 10
P2 3 6
P3 7 1
P4 8 3
The average turn around time of these processes is milliseconds ________.
23. Consider a uniprocessor system executing three tasks T1, T2 and T3, 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 T1, T2 and T3 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 T3 completes its
execution at the end of ______ milliseconds.
24. Consider the following table of arrival time and burst time for three processes P0, P1
and P2.
7. Process Arrival time Burst Time
P0 0 ms 9 ms
P1 1 ms 4 ms
P2 2 ms 9 ms
The pre-emptive shortest job first scheduling algorithm is used. Scheduling is carried out
only at arrival or completion of processes. What is the average waiting time for the three
processes?
a. 5.0 ms b. 4.33 ms
25. In the following process state transition diagram for a uniprocessor system, assume that
there are always some processes
statements:
I. If a process makes a transition D, it would result in another process making transition A
immediately.
II. A process P2 in blocked state can make transition E while another process P1 is in ru
state.
III. The OS uses pre-emptive scheduling.
IV. The OS uses non-pre-emptive scheduling.
Which of the above statements are TRUE?
a. i and ii b. i and iii
26. The maximum number of processes that can be in Ready state fo
with n CPUs is
a. n b. n2
27. Which of the following statements
Scheduling)?
S1: It causes minimum average waiting time
S2: It can cause starvation
Process Arrival time Burst Time
emptive shortest job first scheduling algorithm is used. Scheduling is carried out
or completion of processes. What is the average waiting time for the three
c. 6.33 ms d. 7.33 ms
In the following process state transition diagram for a uniprocessor system, assume that
there are always some processes in the ready state: Now consider the following
I. If a process makes a transition D, it would result in another process making transition A
II. A process P2 in blocked state can make transition E while another process P1 is in ru
emptive scheduling.
emptive scheduling.
Which of the above statements are TRUE?
c. ii and iii d. ii and iv
The maximum number of processes that can be in Ready state for a computer system
c. 2n d. Independent of n
statements is/are FALSE about SJF (Shortest Job First
S1: It causes minimum average waiting time
emptive shortest job first scheduling algorithm is used. Scheduling is carried out
or completion of processes. What is the average waiting time for the three
In the following process state transition diagram for a uniprocessor system, assume that
in the ready state: Now consider the following
I. If a process makes a transition D, it would result in another process making transition A
II. A process P2 in blocked state can make transition E while another process P1 is in running
r a computer system
FALSE about SJF (Shortest Job First
8. a. only S1 b. Only S2 c. Both S1 and S2 d. Neither S1 nor S2
28. Five jobs A, B, C, D and E are waiting in Ready Queue. Their expected runtimes are 9, 6,
3, 5 and x respectively. All jobs entered in Ready queue at time zero. They must run in _____
order to minimize average response time if 3 < x < 5.
a. B,A,D,E,C b. C,E,D,B,A c. E,D,C,B,A d. E,D,C,B,A
29. Consider a system which have ‘n’ number of processes and ‘m’ number of resource
types. The time complexity of the safety algorithm, which checks whether a system is in safe
state or not, is of the order of:
a. O(mn) b. O( m2
n2
) c. O(m2
n) d. O(mn2
)
30. Which of the following is not an optimization criterion in the design of a CPU scheduling
algorithm?
a. Minimum CPU utilization
b. Maximum throughput
c. Minimum turnaround time
d. Minimum waiting time
31. In a system using single processor, a new process arrives at the rate of six processes per
minute and each such process requires seven seconds of service time. What is the CPU
utilization?
a. 70% b. 30% c. 60% d. 64%
32. Consider three processes (process id 0, 1, 2 respectively) with compute time bursts 2, 4
and 8 time units. All processes arrive at time zero. Consider the longest remaining time first
(LRTF) scheduling algorithm. In LRTF ties are broken by giving priority to the process with
the lowest process id. The average turn around time is:
a. 13 units b. 14 units c. 15 units d. 16 units
33. Three process p1, P2 and P3 arrive at time zero. Their total execution time is 10ms,
15ms, and 20ms respectively. They spent first 20% of their execution time in doing I/O, next
60% in CPU processing and the last 20% again doing I/O. For what percentage of time was
the CPU free? Use Round robin algorithm with time quantum 5ms.
9. a. 17% b. 19.16% c.16.9% d.18.18%
34. Consider the 3 processes, P1, P2 and P3 shown in the table.
Process Arrival time Time Units Required
P1 0 5
P2 1 7
P3 3 4
The completion order of the 3 processes under the policies FCFS (first come first served) and
RR2 (round robin scheduling with CPU quantum of 2 time units) are:
a. FCFS : P1,P2,P3 & RR2 : P1,P2,P3
b. FCFS : P1,P3,P2 & RR2 : P1,P3,P2
c. FCFS : P1,P2,P3 & RR2 : P1,P3,P2
d. FCFS : P1,P3,P2 & RR2 : P1,P2,P3
35. Which of the following statements is not true for Multi Level Feedback Queue processor
scheduling algorithm?
a. Queues have different priorities.
b. Each queue may have different scheduling algorithm.
c. Processes are permanently assigned to a queue.
d. This algorithm can be configured to match a specific system under design
36. Which of the following statement is true?
a. Which of the following statement is true?
b. Hard real time OS has more jitter than soft real time OS
c. Hard real time OS has equal jitter as soft real time OS
d. None of the above
37. Consider the following statements about process state transitions for a system using
preemptive scheduling.
i. A running process can move to ready state.
10. ii. A ready process can move to ready state.
iii. A blocked process can move to running state.
iv. A blocked process can move to ready state.
Which of the above statements are TRUE?
a. i,ii and iii only b. ii and iii only c. i,ii and iv only d. I,ii,iii and iv
38. Consider the following four processes with arrival times (in milliseconds) and their
length of CPU bursts (in milliseconds) as shown below:
Process P1 P2 P3 P4
Arrival time 0 1 3 4
CPU burst time 3 1 3 Z
These processes are run on a single processor using pre-emptive Shortest Remaining Time
First scheduling algorithm. If the average waiting time of the processes is 1 millisecond, then
the value of Z is________.
39. 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.
Process Arrival time Burst Time Priority
P1 0 11 2
P2 5 28 0
P3 12 2 3
P4 2 10 1
P5 9 16 4
The average waiting time (in milliseconds) of all the processes using preemptive priority
scheduling algorithm is _____________.
40. Consider the following statements about HRRN( Highest Response Ratio next)
scheduling
i. Non pre-emptive
ii. Favours shorter jobs
iii. Limits the waiting time of longer jobs
iv. All of the above