Block Level I/O

Speculation

What about cache coherence? Each level of multi-CPUs, RAM, disk controller, may or may not have different caches

Disk Scheduling

Want:

Hard disk has: seek time, rotational latency, but focus on seek time

Define cost is where read head is and where it should be

Analysis of simple FCFS disk scheduling with random reads:

Average cost: $\dfrac{1}{3}$ (tons of calculus)

Shortest Seek Time First (SSTF):

However, this is unfair: what if reads keep on coming that are close?

Elevator algorithm (SSTF, but keep on going in the same direction):

Fair, since no starvation

But, unfair since it favors accesses in the middle

Circular elevator algorithm:

At the top of the seek, go back down (no going in the negative direction)

SSTF + FCFS:

Batch as jobs come in, do within batch for shortest seek time

Anticipatory scheduling:

Dally a little bit until a more advantageous seek