SLIDE 2 2
Disk Basics
Disk drives cont ain met allic plat t ers
spinning around a cent ral spindle
Read/ writ e head assembly is mount ed on an
arm t hat moves across t he surf ace of t he plat t ers
Tr ack
Terms
Track = one r ing ar ound t he sur f ace of one
Sect or = one piece of a t r ack (usually 512
byt es); More sect ors in out er t racks
Cylinder = all t racks at t he same dist ance
f rom t he cent er of t he plat t ers (I .e. all t racks readable wit hout moving t he disk arm)
Disk Addressing
Ear ly disks wer e addr essed wit h cylinder # ,
sur f ace # and sect or #
Today disks hide inf or mat ion about t heir geomet r y
Disks export a logical array of blocks Disk it self maps f rom logical block address (LBA) t o
cylinder/ surf ace/ sect or
Allows disk t o remap bad sect ors (when f ormat t ed disk
reserves some sect ors t o use as replacement s)
Allows disk t o hide t he non- unif ormit y of t he st orage
- Mor e dat a on out er t r acks, et c.
Disks also have int er nal caches so t hat not all
r equest s go t o t he media
On reads t ake advant age of mult iple accesses t o t he
same t rack
On writ es, say writ e is “done” when it is memory inside
t he disk
Disk Format t ing
Low-level f or mat t ing involves dividing t he
magnet ic media int o sect or s
Each sect or act ually consist s of a header, dat a and a
t railer
Header and t railer cont ain inf ormat ion like sect or
number and error correct ing codes (ECC)
ECC is addit ional redundant bit s t hat can of t en correct
f or bit errors in t he st ored value OS also f ormat s drive
1st divides int o part it ions – each part it ion can be t reat ed
as a logically separat e drive
2cd f ile syst em f ormat t ing of part it ions (more on t hat
lat er)
Disk I nt erf aces
I nt er f ace t o t he disk
Request specif ied wit h LBA and lengt h Request placed on bus, lat er reply placed on bus
Device dr iver hide t hese det ails
P
rovide abst ract ion of synchronous disk read OS use t he disk t o pr ovide ser vices
Virt ual memory
OS expor t s higher level abst r act ions
File syst ems
Some applicat ions use t he device dr iver int er f ace
t o build abst r act ions of t heir own (get t heir own par t it ion)
Dat abase syst ems
RAI D
Expose an array of sect ors but
implement ed as mult iple physical disks
Arrangement and relat ionship of disks RAI D levels