#separator:tab
#html:true
#notetype:Basic
#tags column:3
#deck:cracked.guide::TAOCP Vol 3::5.4.9 Disks and Drums
#columns:Front	Back	Tags
TAOCP §5.4.9 Disks and Drums: what does it cover?	External sorting on random-access devices. Knuth shows how seek and latency costs turn the choice of merge pattern into an optimal-tree problem, how to size buffers, and how to spread files over several disks with striping, including randomized striping that keeps all disks busy during a merge.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.4.9 cracked.guide::kind::about
TAOCP §5.4.9: why does it matter?	Much more relevant than the tape sections: disk-based thinking (minimize seeks, read large sequential blocks) still matters for databases, even on SSDs.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.4.9 cracked.guide::kind::why
TAOCP §5.4.9: what traps should you watch for?	<ul><li>Taking 1970s timing numbers literally.</li></ul>	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.4.9 cracked.guide::kind::traps
TAOCP §5.4.9, exercise 21 (rated M15, recommended): what is it asking?	How many blocks of a striped file land on each disk.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.4.9 cracked.guide::kind::exercise
TAOCP §5.4.9, exercise 23 (rated 20, recommended): what is it asking?	Buffer space needed for continuous two-way merging under two striping schemes.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.4.9 cracked.guide::kind::exercise
TAOCP §5.4.9, exercise 19 (rated 25, recommended): what is it asking?	A keysorting scheme that sorts keys first and moves records later. Still how big sorts avoid moving data twice.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.4.9 cracked.guide::kind::exercise
TAOCP §5.4.9, exercise 20 (rated 25, recommended): what is it asking?	What virtual memory does and does not buy you for sorting. Ages well.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.4.9 cracked.guide::kind::exercise
TAOCP §5.4.9, exercise 4 (rated M21, recommended): what is it asking?	Buffer sizing when all input buffers are equal and only the output buffer varies.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.4.9 cracked.guide::kind::exercise
TAOCP §5.4.9, exercise 6 (rated 22, recommended): what is it asking?	Find an optimal merge tree for 23 runs; a short program helps.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.4.9 cracked.guide::kind::exercise
TAOCP §5.4.9, exercise 7 (rated M24, recommended): what is it asking?	Optimal merge patterns when runs have different lengths.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.4.9 cracked.guide::kind::exercise
TAOCP §5.4.9, exercise 29 (rated M30, recommended): what is it asking?	Bound the average input time of randomized striping. The stretch.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.4.9 cracked.guide::kind::exercise
TAOCP §5.4.9: how many exercises, and how are they rated?	31 exercises, rated M15 to 49.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.4.9 cracked.guide::kind::exercises
TAOCP §5.4.9: what should you be comfortable with first?	<ul><li>5.4.1 Multiway Merging</li><li>5.4.6 Practical Considerations</li></ul>	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.4.9 cracked.guide::kind::prereqs
TAOCP §5.4.9: how should you work through it?	Read with modern storage in mind. Ask at each point: what changes for an SSD? What stays the same?	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.4.9 cracked.guide::kind::approach
