Add the rest of university notes

This commit is contained in:
John Gatward committed 2026-10-04 14:02:35 +01:00
1 parent c1b84c7f7d
commit d0f27f276b
366 files changed
+9844 -110

No files matched your search

@@ -26,7 +26,7 @@ The type of algorithm used by the scheduler is influenced by the type of operati
- Invoked very frequency, hence must be fast
- Usually called in response to *clock interrupts*, *I/O interrupts*, or *blocking system calls*
![Image](/lectures/osc/assets/1.png)
![Image](assets/1.png)
**Non-preemptive** processes are only interrupted voluntarily (e.g. I/O operation or "nice" system call `yield()`)
>Windows 3.1 and DOS were non-preemptive
@@ -67,7 +67,7 @@ Concept: a non-preemptive algorithm that operates as a strict queuing mechanism
| Positional fairness | Favours long processes over short ones (think supermarket checkout) || |
| Easy to implement | Could compromise resource utilisation |
![Image](/lectures/osc/assets/2.png)
![Image](assets/2.png)
**Shortest job first**
A non-preemptive algorithm that starts processes in order of ascending processing time using a provided estimate of the processing
@@ -78,7 +78,7 @@ A non-preemptive algorithm that starts processes in order of ascending processin
| - | Fairness and predictability are compromised |
| - | Processing times need to be known in advanced |
![Image](/lectures/osc/assets/3.png)
![Image](assets/3.png)
**Round Robin**
A preemptive version of FCFS that focuses context switches at periodic intervals or time slices
@@ -100,7 +100,7 @@ The length of the time slice must be carefully considered.
>A small time slice (~ 1ms) gives a good response time.
>A large time slice (~ 1000ms) gives a high throughput.
![Image](/lectures/osc/assets/4.png)
![Image](assets/4.png)
**Priority Queue**
A preemptive algorithm that schedules processes by priority
@@ -115,10 +115,10 @@ A preemptive algorithm that schedules processes by priority
Low priority starvation only happens when a static priority level is used.
You could give higher priority processes a larger time slice to improve efficiency
![Image](/lectures/osc/assets/5.png)
![Image](assets/5.png)
Exam Q 2013: Which algorithms above lead to starvation?
>Shortest job first and highest priority first.
![Image](/lectures/osc/assets/6.png)
![Image](/lectures/osc/assets/7.png)
![Image](assets/6.png)
![Image](assets/7.png)