LATEST UPDATE (ALREADY GRADED A+)
CPU Utilization
percentage of time the CPU is actively being used
-maximize utilization
-maximized by multi programming (when one program has to wait, another one takes over)
Throughput
# of job completions (processes) per unit of time
-maximize throughput
Turnaround time
amount of time to execute a process
(completion time - arrival)
Waiting time
(Queuing time) amount of time process spent waiting in the ready queue
-minimize waiting time
Response time
time of submission to time first response is produced
-minimize (but not too much)
Fairness
share CPU among users in some equitable way
-can't really track this
Preemptive Algorithim
Takes CPU away from currently executing processes when a higher priority process is ready
consequence: starvation
Non-preemptive
, a job will not stop until finished
What are multilevel queues?
Foreground (interactive) -RR
background (batch) - FIFO
-scheduling happens in between queues
-each queue has absolute priority over lower level queues (this is why starvation can happen)
In priority scheduling, if all of the priorities are the same, what happens?
FIFO
Starvation
occurs if a lower priority process never runs
Multilevel Feedback Queues
A process can move in between various queues
-aging
Aging
-Can happen because of multilevel feedback queue
-it prevents starvation
Multiple Processor Scheduling
CPU scheduling is more complex when multiple CPU's are available
-AMP
-SMP
-Processor affinity
Asymmetric multiprocessing
-One process accesses the system's data structures
-don't need data sharing (Asymmetric = NOT sharing)
-other processors execute only user code
Symmetric Multiprocessing
-Each process is self-scheduling
-all processes has own private queue of ready processes
-Windows, UNIX, Mac Os
Processor Affinity (soft and hard)
-CPU pinning
-process has affinity for processor on which it is running