Keyboard shortcuts

/ or ⌘/Ctrl K
Find a note
j / k
Next / previous section or linked note
h / l
Collapse or go to parent / expand or enter
e or Alt-click
Read a linked note here
o
Open focused note on its own
g g / G
First / last section or linked note
g h / g a
Home / all notes
g b / g t
Backlinks / table of contents
t
Cycle System, Light, Dark
? / Esc
Show / close this reference

Search: ↑/↓ or Ctrl N/P, Enter to open. Shortcuts pause while typing.

hard drives [e5490541]

Tags: hardware

1. Spinning Rust [e5f32c22]

  • Operating systems implement all sorts of spinning rust scheduling, since they can make a good guess about how long operations will take (compared to jobs)

    • SSTF - shortest seek time first, but vulnerable to starvation due to a stream of nearby jobs
    • SCAN - loops back and forth, enqueueing for the next scan
    • SPTF - Shortest access first
  • Disks can also merge IOs together

2. NVMe [7de46ff9]

2.1. Writes and Reads

  • NVMe writes and reads are done through two circular buffers, a submission queue and a completion queue.
  • When the host system has a command to send to the SSD, it places the command in the submission queue and then rings the doorbell. This updates the tailpointer of the queue
  • Similar thing happens for completion queues, the drive updates the head doorbell when something is done

2.2. VS SATA and SCSI

Links from this note 1