Os Process Scheduling Algorithms
Os Process Scheduling Algorithms
http://www.tutorialspoint.com/operating_system/os_process_scheduling_algorithms.htm
Copyright tutorialspoint.com
We'll discuss four major scheduling algorithms here which are following
Priority Scheduling
P0 0-0=0
P1 5-1=4
P2 8-2=6
P3 16 - 3 = 13
Impossible to implement
Processer should know in advance how much time process will take.
P0 3-0=3
P1 0-0=0
P2 16 - 2 = 14
P3 8-3=5
Processes with same priority are executed on first come first serve basis.
Priority can be decided based on memory requirements, time requirements or any other
resource requirement.
Wait time of each process is following
P0 9-0=9
P1 6-1=5
P2 14 - 2 = 12
P3 0-0=0
Once a process is executed for given time period. Process is preempted and other process
executes for given time period.
P0 0 0 + 12 3 = 9
P1 31 = 2
P2 6 2 + 14 9 + 20 17 = 12
P3 9 3 + 17 12 = 11