19. Disk Storage : Physical Data Storage

Physical disk storage is composed of patterns (usually magnetic) stored in concentric circles on the surface of (one or more) platters.
Components of Physical Disk Storage
The disk subsystem is controlled by a "Disk IO Controller" board (in a microcomputer system) or by a "Disk Channel IO Processor" (on a mainframe computer system). The differences between these two are not significant at this point and we will treat them as being identical.

The disk surfaces are coated with a metallic oxide similar to that used on cassette music tapes or video tapes; data is magnetically recorded on these surfaces much the same way as on cassette or video tapes. The actual recording and "play-back" is done through a "read-write" head. Each surface has its own "read-write" head attached to a shared "access comb". When the disk drive is operating, the disk is constantly rotating; without moving the read-write heads, a circular path where data can be recorded or played-back passes under each head; this circular path is called a "track". The collection of tracks which can be thus accessed without moving the access comb (one track from each surface) is called a "cylinder". By moving the access comb in or out (towards or away from the spindle), the Disk IO Controller can store or recall data stored on different cylinders.

The Disk IO Controller copies blocks of data between main memory and the disk surface. These blocks of data are (generally) only a fraction of what could be stored on one track; each track is therefore divided up into smaller storage areas called "sectors", where each sector is large enough to hold one of these "blocks" of data.

Actually, use of the term "sector" implies that fixed sized storage area is used for all blocks of data stored on the disk; this is not true for some mainframe disk storage systems which use variable sized "physical blocks".

Physical I/O Information Requirements

Translation of Logical Data Storage Requirements

Major Components of Boot Sector

offset contents
0000h E9 xx xx or EB xx 90 (JMP to bootstrap code)
0003h OEM name and version (8 bytes)
000Bh bytes per sector (2 bytes)
000Dh sectors per allocation unit (1 byte)
000Eh reserved sectors, starting at 0 (2 bytes)
0010h number of copies of FAT (1 byte)
0011h number of root directory entries (2 bytes)
-- if <4087 12-bit FAT entries
-- otherwise 16-bit FAT entries
0013h number of sectors in (logical) drive (2 bytes)
0015h media descriptor byte
-- 0F0h: 3.5" DSHD (18 sectors/track)
-- 0F8h: fixed disk
-- 0F9h: 5.25" DSHD (15 sectors/track)
-- ---- 3.5" DSDD (9 sectors/track)
-- 0FCh: 5.25" SS (9 sectors/track)
-- 0FDh: 5.25" DS (9 sectors/track)
-- ---- 8" SSSD (DOS 2+)
-- 0FEh: 5.25" SS (8 sectors/track)
-- ---- 8" SSSD (DOS 1)
-- ---- 8" DSDD
-- 0FFh: 5.25" DS (8 sectors/track)
0016h number of sectors per FAT (2 bytes)
0018h sectors per track (2 bytes)
001Ah number of heads (2 bytes)
001Ch number of hidden sectors (4 bytes)
0020h sectors in logical volume (DOS 4+; size>32MB) (4 bytes)
0024h physical drive number (1 byte)
0025h reserved/unused
0026h 29h ("extended boot signature")
0027h volume ID (4 bytes)
002Bh volume label (11 bytes)
0036h unused/reserved (8 bytes)
003Eh bootstrap code

MS-DOS Directory Structure

Each directory entry is a 32 (20h) byte record:

WARNING: The IBM PC stores multi-byte values in Little-Endian order, which appears in a DEBUG dump listing to be backwards to what you might expect; so for example a 4-byte size that displays in the dump as 1A E2 04 00 must be reversed and read as 0004E21Ah.