What is CPU scheduling?
Determine which process to run next
Types of Scheduling
What is short term scheduling?
== dispatcher
* Determine which process to execute next
* Invoked after
– clock interrupt
– system calls and traps to kernel
– signals
What is medium term scheduling?
What is long term scheduling?
When does CPU scheduling happen?
when processes:
1.switches from running to waiting state
2.switches from running to ready state
3.switches from waiting to ready
4.terminates
Types of CPU scheduler
What does a long-term scheduler do?
Selects which processes should be brought into the ready
queue
What are CPU scheduling algorithims based on?
What is CPU utilization when it comes to CPU scheduling criteria?
Need to keep the CPU as busy as
possible ranging from 0 to 100%. In real systems it should
range from 40% (lightly loaded) to 90% (heavily used) system
What is throughput when it comes to CPU scheduling criteria?
Measure of the number of processes completed per unit time. E.g. a long processes this rate may be 1 process per hour, for short transactions can be 10 processes per second
What is turnaround time when it comes to CPU scheduling criteria?
This is the sum of the periods spent waiting to get into memory, waiting in the ready queue, executing on the CPU and doing the IO
What is waiting time when it comes to CPU scheduling criteria?
This is the total time a process waits in the ready queue
What is response time when it comes to CPU scheduling criteria?
Time from the submission of a request until the 1st response is produced, but not the time taken to output that response
List Short Term Scheduling Algorithms
Define Response Time (T)
This is a measure from the time a process arrives till it completes, so all the waiting time is included
Define Response Time when it is measured
T: time that process p is present;
finish time – start time
Define Wasted Time (W)
waiting time,
(completion time – arrival time) – processor run time
Define Wasted Time when it is measured
W: Response Time (T) – time for execution (t)
Define Penalty Ratio (P)
Is the inverse of response ratio so a penalty ratio of 1 is perfect which subsequently rises upwards
Define Penalty Ratio when it is measured
P: Response Time (T)/time for execution (t)