System Software and Operating System 04 - Daily Class Notes
System Software and Operating System 04 - Daily Class Notes
UGC NET
DAILY
CLASS NOTES
Computer
a. Priority-Based with pre-emptive Scheduling:-At the time of scheduling, a process dispatched will be the
one that has highest priority amongst the processes waiting in the Ready Queue. When a process P1 is
executing, if another processP1 of higher priority become ready to run during its execution, then P1will be
preemted by pj.
Ex-5
NOTE:-
Priority Pre-emtive WT and TA <Priority Non-Pre-emtive
b. Rmound Robin Scheduling:-This scheduling algorithm is specially tailored for interactive Time-Sharing
Systems. A small unit of time, called Time-slice of Time Quantum is defined.
Ex- 6
Average Turn over Time: 8.75ms
Average waiting Time: 14.25 ms
3
Q. Consider the following processes with burst times, priority and arrival times.
Process P1 P2 P3 P4
Burst time 5 2 6 4
Priority 4 (low) 3 1 (high) 2
Arrival time 0 2 2 6
Using FCFS scheduling compute the average waiting time of processes (FCFS selects highest priority
process when more than one process arrived at the same time).
A. 4.75 B. 5.25
C. 6.75 D. 8.75
Ans. B
Solution:
Find average turnaround time and average waiting time using round robin CPU scheduling?
A. 4, 0 B. 5.66, 1.66
C. 5.66, 0 D. 7, 2
Ans. B
Solution:
P1 P2 P1 P2 P3 P3 P3
0 2 4 5 7 9 11 12
Solve the above problem by using SJF (pre-emptive) and FCFS. Choose the correct option.
A. TAT (SJF) > TAT (FCFS).
B. Throughput (FCFS) > Throughput (SJF)
C. TAT (FCFS) > TAT (SJF)
D. None
Ans. C
Solution:
SJF (Preemptive)
P1 P2 P3 P2 P4 P1
0 2 4 5 7 11 16
Average Turn around Time= 16+5+1+6=28/4=7
FCFS
P1 P2 P3 P4
0 7 11 12
Average Turn Around time: 7+9+11+8 =35/4=8.75
PW Web/App : https://smart.link/7wwosivoicgd4
Library - https://smart.link/sdfez8ejd80if