Definitions
A disk is a storage device that refers to magnetic media, such as:
- a floppy disk,
- the disk in your computer's hard drive,
- an external hard drive.
It's also known as mass storage device.
Disks are always rewritable unless intentionally locked or write-protected. You can easily partition a disk into several smaller volumes, too.
Disks are usually sealed inside a metal or plastic casing (often, a disk and its enclosing mechanism are collectively known as a “hard drive”).
A disk is not a disc (optical media).
On the memory hierarchy, they are classified as external memory.
The minimal unit of write/read is called for all disks a sectors. (Flash disk does not have a sector but the term applied also). Sector can be bundled in logical unit called blocks.
Type
Spinning
Flash
Flash disks 1) have no mechanical parts but the spinning disk storage structure is emulated.
On flash memory, the minimum size of a read is typically much smaller than a minimum write
List:
Disk Operations
The performance of the disk are really depend of the access mode (random or sequential)
See also: I/O - Request (Write/Read) - IO Request Packet (IRP)
Read
On a spinning disk drive, when data are requested by a process which is identified:
- the data is read.
The combination of the seek and rotational time associated with obtaining the data is the access time.
- the data is then transferred to the embedded disk controller that is physically located on the disk drive unit.
The most costly portions of this process is the time it takes for the head to move to the correct track, for example, seek time and the rotation time of the disks platters (latency). Cost here is referenced in time. The longer it takes for the physical activity to be completed, the longer the server process must wait for its data. To get an understanding of what contributes to the relative time required to get data from the disk subsystem up to the PCI bus, look at the pie chart.
Then from the embedded disk controller, the data is send to the host system (the computer) with one of this type of transport:
- Direct Memory Access (DMA): a memory access technology. It allows the system memory (peripherals) to read and write directly into other storage device by bypassing the CPU.
- Programmed Input / Output (PIO) refers to control the data access through the CPU. Compared to DMA, PIO transfer rate is slower.
Write
During the write operation, the host issue a write command chipset (write command), then this command will be sent to the hard disk.
- The Host send an order (write 4 blocks from 1000).
- The hard disk after receiving the order ask the the host to send the data.
- The Data are placed into the write buffer.
- The Hard disk find the corresponding blocks in the physical sectors and the data are written to disc.
- The Hard disk return information indicating that the write operation is complete.
Counter / Metrics
Density
The key counter relating to density per platter are:
- Tracks Per Inch (TPI): the number of tracks that can fit in a given area (inch).
- and Bits Per Inch (BPI): the number which defines how many bits can be written onto one inch of a track on a disk surface.
With fdisk, you can get this information by using the p command.
fdisk /dev/sda2
Command (m for help): p
Disk /dev/sda2: 21.3 GB, 21361052160 bytes
255 heads, 63 sectors/track, 2597 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Others metrics
- % Disk time: the percentage of elapsed time that the disk drive is busy servicing read or write requests.
Manager
Windows: Windows - Disk