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

+10 -6
View File
@@ -16,7 +16,7 @@
>
> Hard disks are currently about 4 orders of magnitude slower than main memory.
![hard drive diagram](/lectures/osc/assets/a5.png)
![hard drive diagram](assets/a5.png)
#### Low Level Format
@@ -46,18 +46,20 @@ NOTE: disk capacity is reduced due to preamble & ECC
* **Transfer time**: time to transfer the data
![hard drive access times](/lectures/osc/assets/a6.png)
![hard drive access times](assets/a6.png)
Multiple requests may be happening at the same time (concurrently), so access time may be increased by **queuing time**
In this scenario, dominance of seek time leaves room for **optimisation** by carefully considering the order of read operations.
![hard disk delay](/lectures/osc/assets/a7.png)
![hard disk delay](assets/a7.png)
The **estimated seek time** (i.e to move the arm from one track to another) is approximated by:
$$
T_{s} = n \times m + s
$$
In which $T_{s}$ denotes the estimated seek time, $n$ the **number of tracks** to be crossed, $m$ the **crossing time per track** and $s$ any **additional startup delay**.
> Let us assume a disk that rotates at 3600 rpm
@@ -66,9 +68,11 @@ In which $T_{s}$ denotes the estimated seek time, $n$ the **number of tracks** t
> * The average **rotational latency** $T_{r}$ is then 8.3 ms
>
> Let **b** denote the **number of bytes transferred**, **N** the **number of bytes per track**, and **rpm** the **rotation speed in rotations per minute**, the per track, the transfer time, $T_{t}$, is then given by:
>
> $$
> T_{t} = \frac b N \times \frac {ms\space per\space minute}{rpm}
> $$
>
> $N$ bytes take 1 revolution => $\frac{60000}{3600}$ ms = $\frac {ms\space per\space minute}{rpm}$
>
> $b$ contiguous bytes takes $\frac{b}{N}$ revolutions.
@@ -119,7 +123,7 @@ In a dynamic situation, several I/O requests will be **made over time** that are
>
> The total length is: `|11-1|+|1-36|+|36-16|+|16-34|+|34-9|+|9-12|=111`
>
> ![FCFS](/lectures/osc/assets/a8.png)
> ![FCFS](assets/a8.png)
@@ -131,7 +135,7 @@ In a dynamic situation, several I/O requests will be **made over time** that are
>
> Total length is: `|11-12|+|12-9|+|9-16|+|16-1|+|1-34|+|34-36|=61`
>
> ![SSTF](/lectures/osc/assets/a9.png)
> ![SSTF](assets/a9.png)
>
> Disadvantages:
>
@@ -148,7 +152,7 @@ In a dynamic situation, several I/O requests will be **made over time** that are
>
> Total length: `|11-12|+|12-16|+|16-34|+|34-36|+|36-9|+|9-1|=60`
>
> ![scan algorithm](/lectures/osc/assets/b1.png)
> ![scan algorithm](assets/b1.png)
>
> **Disadvantages**:
>