Friday, August 13, 2010

Access methods

Disk drives are block storage devices. Each disk is divided into logical blocks (collection of sectors). Blocks are addressed using their logical block addresses (LBA). Read from or writing to disk happens at the granularity of blocks.

Originally the disk capacity was quite low and has been improved in one of several ways. Improvements in mechanical design and manufacture allowed smaller and more accurate heads, meaning that more tracks could be used on each of the platters. Advancements in data compression methods created more information in each of the individual sectors, and this was instrumental in allowing drives to store smaller units of data. sectors of data, the smallest unit stored, were reduced and so less wasted space was created.

The drive stores data onto cylinders, heads and sectors. The sectors unit is the smallest size of data to be stored in a Hard Disk Drive and each file will have many sectors units assigned to it. The smallest entity in a CD is called a frame, which consists of 33 bytes and contains six complete 16-bit stereo samples (two bytes × two channels × six samples = 24 bytes). The other nine bytes consist of eight CIRC error-correction bytes and one subcode byte used for control and display.

The information is sent from the computer processor to the BIOS into a chip controlling the data transfer. This is then sent out to the hard drive via a multi-wire connector. Once the data is received onto the circuit board of the drive, it is translated and compressed into a format that the individual drive can use to store onto the disk itself. The data is then passed to a chip on the circuit board that controls the access to the drive. The drive is divided into sectors of data stored onto one of the sides of one of the internal disks. In the picture opposite we have two disk, this gives us 4 sides.

The controller chip determines available free space by listing sectors in a table of used and unused areas. This list is what determines where each part of a file is kept and where they are relative to track, sector and disk. Different file systems use different types of addressing systems such as FAT, NTFS, Joliet (ISO 9660) and UDF. Two copies of these lists are normally held and are used to ensure data integrity. If a problem occurs a disk check can be run and it compares these two lists to determine where the problem occurs and rebuilds the file structure from them. When a computer drive is formatted the files are not erased but rather the lists are simply deleted. The drive hardware will now treat all sectors as clean and overwrite them with new data.

The hardware on the drive tells the actuator arm where it is to go for the relevant track and the compressed information is then sent down to the head which changes the physical properties, optically or magnetically for example, of each byte on the drive, thus storing the information. A file is not stored in a linear manner, rather, it is held in the best way for quickest retrieval.

Mechanically, there are usually two types of motion: the constant rate rotation, which passes the data of a track sequentially under a read head, and the radial (side-to-side) head motion or seek, which selects the track. Rotation is faster than seek, so the logical blocks are related in simple ways to the physical tracks.

No comments:

Post a Comment