Disks

From COMP15212 Wiki
Revision as of 12:46, 26 July 2019 by gravatar Yuron [userbureaucratinterface-adminsysopPHRhYmxlIGNsYXNzPSJ0d3BvcHVwIj48dHI+PHRkIGNsYXNzPSJ0d3BvcHVwLWVudHJ5dGl0bGUiPkdyb3Vwczo8L3RkPjx0ZD51c2VyPGJyIC8+YnVyZWF1Y3JhdDxiciAvPmludGVyZmFjZS1hZG1pbjxiciAvPnN5c29wPGJyIC8+PC90ZD48L3RyPjwvdGFibGU+] (talk | contribs) (1 revision imported)
Depends on IO

This article is very much an overview of what is logically thought of as a “disk”. It does not delve into lots of detail about the operation of a hard disk drive.

Firstly, what is generically referred to as a “disk” is probably a magnetic disk (actually a stack of several physical disks) but could be an optical disc or some non-circular form of storage: Solid-State Drives (SSDs) such as a “memory stick” which uses semiconductor “Flash” memory. Some ‘drives’ even employ DRAM. Other “disks” may be hybrid systems with both magnetic media and an internal semiconductor cache.

The point here is that the “disk” is really an auxiliary memory and its details can typically be abstracted away. (However some influence of the evolution from spinning disks may still be evident!)

A computer’s ‘main’ memory (“primary” storage) architecture is set by the processor’s ISA; thus a 64-bit x86 processor is able to address (virtually) 264 locations – each location potentially containing an 8-bit (byte) value – directly.

In auxiliary storage the addressing is managed in software so the address range can be different – indeed larger. On the other hand, access times are much greater so auxiliary (or “secondary”) storage is used for blocks of data much larger than a byte which are addressed as indivisible units. Thus a block number (address) may refer to (say) 512 bytes (4096 bits) rather than 8 bits of data.

All memory

Speeds

A desktop processor cycles in around 500 ps. Primary memory (SDRAM) is much slower (say 100x) but much of this is alleviated by caching.

Solid-State Drives (SSDs) may be SDRAM, which suggests they are a couple of orders of magnitude slower.

Magnetic disk access is dominated by the seek time and the time it takes for the disk to rotate to the correct place to start the read. Together these may add up to a few milliseconds, thus of the order of 107x slower than the effective primary memory speed.

Uses

Secondary memory is primarily useful for: