Operating System/O.S(Neso Academy, HPC Lab. KOREATECH)

12)FCFS Scheduling , Shortest Job First , Priority

Tony Lim 2021. 5. 14. 14:27
728x90

Convoy Effect

if processes with higher burst time arrived before the processes with smaller burst time , then , smaller processes have to wait for a long time for longer processes to release the CPU

 

Turn Around time = Completion time - Arrival time  == duration of process to arrival to completion 

Waiting time = TurnAround time - Burst time

Useful time = Total time - Wasted time

Efficiency = Useful time / Total time

 

 

delta means times to take actually dispatch the process to CPU in this case one milliseconds delay

 

Shortest Job first 

shortest length of the process's next CPU burst.

if same FCFS is used.

can be preemptive or nonpreemptive  , preemptive == Shortest Remaining Time First Scheduling.

But it is hard to know next CPU burst time so we do lots of approximation to predict.

Waiting time = Total waiting time - no.of milliseconds process executed - arrival time

 

Priority Scheduling

A priority is associated with each process , and the CPU is allocated to the process with the highest priority.

preemptive or nonpreemptive   

preemptive = if higher priority process comes than this process will occupy CPU.

nonpreemptive = if higher priority process comes than it will the first at the ready queue.

might cause indefinite blocking or starvation  = to solve if low priority process get old it's priority should be slowly increase

this case is preemptive.

non preemptive

 

728x90