Basic Concepts
CPU - I/O Bursts

- CPU - I/O Burst cycles: where a process is executed followed by a I/O wait
- Of course this means that multiprogramming (2 processes at the same time) is optimal
CPU scheduler
- CPU picks a process in the ready queue and hands it over to a core
- Note: preemptive processes that access the same data, may lead to issues
List of all different scheduling states
Nonpreemptive - not ready now
- Running to waiting (waiting for an input)
- Terminate
Preemptive (baso will come back to it later, even-though it can still be run now) - ready now
- Running to ready (baso its ran out of time, so put in the ready queue)
- Waiting to ready (got its input, so is now the ready queue)
Dispatcher
- Gives control of the CPU to processes selected by the CPU schedular
- Dispatch Latency - the time required to stop one process and continue with another
Steps required to do this:
- Switch context
- Switching to user mode
- Jumping to the location in the program where you last left it, to continue with the program