OS BCS303 - CPU Scheduling Problems
OS BCS303 - CPU Scheduling Problems
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):
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
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