Cpu Scheduling: Dr.P.Suresh
Cpu Scheduling: Dr.P.Suresh
Cpu Scheduling: Dr.P.Suresh
SURESH
BASIC CONCEPTS
P1 P2 P3
0 24 27 30
P2 P3 P1
0 3 6 30
P4 P1 P3 P2
0 3 9 16 24
Now we add the concepts of varying arrival times and preemption to the
analysis
Process i Arrival TimeT Burst Time
P1 0 8
P2 1 4
P3 2 9
P4 3 5
Preemptive SJF Gantt Chart
P1 P2 P4 P1 P3
0 1 5 10 17 26
P1 P2 P3 P1 P1 P1 P1 P1
0 4 7 10 14 18 22 26 30
The CPU is allocated to the process with the highest priority (smallest
integer highest priority)
Preemptive
Nonpreemptive
Scheduling
A new process enters queue Q0 which is served in RR
When it gains CPU, the process receives 8 milliseconds
If it does not finish in 8 milliseconds, the process is moved
to queue Q1
At Q1 job is again served in RR and receives 16
additional milliseconds
If it still does not complete, it is preempted and moved to
queue Q2
MULTIPLE-PROCESSOR SCHEDULING
CPU scheduling more complex when multiple CPUs are available
Multiprocess may be any one of the following architectures:
Multicore CPUs
Multithreaded cores
NUMA systems (Non Uniform Memory Access)
Heterogeneous multiprocessing
MULTIPLE-PROCESSOR SCHEDULING
Symmetric multiprocessing (SMP) is where each processor is self
scheduling.
All threads may be in a common ready queue (a)
Each processor may have its own private queue of threads (b)
MULTIPLE-PROCESSOR SCHEDULING – LOAD BALANCING