Scheduling Algorithms Implementation
Scheduling Algorithms Implementation
A process that allows one process to use the CPU while another
process is delayed (in standby) due to unavailability of any resources
such as I / O etc.
b) CPU time allocated for each process(Busy CPU & less response time)
P2 5
P3 49
b) SJF:
Process that selects the waiting process with the smallest execution time to
execute next.
Has the minimum average waiting time among all scheduling algorithms.
Can lead to “Starvation".
P2 3
P3 2
P4 4
P3
P2
P4
P1
Queue:
Step 1: Assign time slice=2
Step 2: P3 executes completely in cycle 1.
P3
P2
P4
P1
P4
P1
Step 7: P1 (Burst time =3-2=1),
P3 P2 P4 P1 P2, P4 P1
1) FCFS:
I/P: Process names, burst time
O/P: Process execution order, average waiting time.
2) SJF:
I/P: Process names, burst time
O/P: Process execution order, average waiting time.
3) Priority:
4) RR: