0% found this document useful (0 votes)
5 views6 pages

OS BCS303 - CPU Scheduling Problems

The document discusses various CPU scheduling algorithms, including pre-emptive shortest job first, shortest remaining time first, and preemptive priority scheduling. It presents problems related to calculating average waiting times and turnaround times for different sets of processes with given arrival and burst times. Additionally, it addresses context switching overhead and CPU idle time under specific scheduling scenarios.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views6 pages

OS BCS303 - CPU Scheduling Problems

The document discusses various CPU scheduling algorithms, including pre-emptive shortest job first, shortest remaining time first, and preemptive priority scheduling. It presents problems related to calculating average waiting times and turnaround times for different sets of processes with given arrival and burst times. Additionally, it addresses context switching overhead and CPU idle time under specific scheduling scenarios.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

3rd sem , AY-2024-25, OS-BCS303

PROBLEMS ON CPU SCHEDULING


1.

2.

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?

3. Consider the following CPU processes with arrival time (in milliseconds) and length of CPU bursts (in
milliseconds) as given below:

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.

4. Consider the set of processes with arrival time (in milliseconds), CPU burst time (in milliseconds), and
priority ( 0 is the highest priority) show below. None of the processes have I/O burst time.

The average waiting time (in milliseconds) of all the processes using preemptive priority scheduling
algorithm is ___________.
5. 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):

The average waiting time (in milliseconds) of the processes is _____________?

6.Consider the following set of processes that need to be scheduled on a single CPU. All the times are
given in milliseconds.

Using the shortest remaining time first scheduling algorithm, the average turnaround time (in msec) is
________________

7.

8.
9.

10.

11.

12.

13.
14.

15.

16.

17.
18.

19.

20.

21.
22.

i) The average turnaround time with the shortest remaining time first (SRTF) and shortest job first (SJF)
scheduling for the seven processes listed in the table is ___________

ii) Consider the context switching overhead of 1 unit. What is the context switching overhead while using
SRTF and SJF scheduling for the seven processes listed in the table above. Include the context switching to
load the first process?

iii) For the processes listed in the table above, the schedule length is ______ with a FCFS scheduling
scheme

Ans i: 12 and 13.4


Ans ii: 10 and 7
Ans iii: 29

23. Consider 3 processes that start simultaneously. Each process from start to finish takes 40, 50, and 60 ms
respectively. Of this, the first 20% of the time is spent waiting for IO events and the next 80% time for
computation

i) The scheduler uses FCFS scheduling. Assuming that all I/O operations are overlapped. How much time in
milli-seconds is the CPU idle?
Ans: 8 ms

ii) From the data given above, which of the following is the average turn around time considering only the
time when a process is either running or in the ready queue?
Ans: 72 ms

iii) For the data given above, the schedule length is _____________ assuming SRTF scheduling algorithm
Ans: 120

You might also like