Home> Common Problem> body text

What is the physical unit of disk read and write operations?

青灯夜游
Release: 2020-07-23 14:06:17
Original
22767 people have browsed it

The physical unit of disk read and write operations is: sector. The operating system performs read/write operations on the disk in units of sectors. A sector is the smallest physical unit in which a disk stores information.

What is the physical unit of disk read and write operations?

Sector refers to the area divided on the disk. Each track on the disk is divided into several arc segments, and these arc segments are sectors of the disk. Sectors are the basic unit for hard disk reading and writing.

Each side of the disk is divided into many tracks, which are concentric circles on the surface. The closer to the center, the smaller the circles.

Each track is divided into equal parts in units of 512 bytes, called sectors. In the parameter list of some hard disks, you can see parameters describing the number of sectors for each track. It Usually marked with a range, such as 373~746, which means that the outermost track has 746 sectors, and the innermost track has 373 sectors. Therefore, it can be calculated that the capacity of the tracks is from 186.5KB to 373KB(190976B--381952B).

Disk drives read and write data to the disk in units of sectors.

On the disk, the DOS operating system allocates disk space to files in units of "clusters". The cluster of a hard disk is usually multiple sectors, which is related to the type of disk, DOS version and the size of the hard disk partition.

Each cluster can only be occupied by one file. Even if there are several bytes in this file, more than two files are never allowed to share a cluster, otherwise data confusion will occur.

This mechanism with clusters as the smallest allocation unit makes it relatively easy to manage data on the hard disk, but it also causes a waste of disk space, especially when there are a large number of small files. A large gigabit hard drive can waste hundreds of megabytes of disk space.

In order to search and manage sectors, sectors need to be numbered. The numbering of sectors starts from track 0, and the starting sector is sector 1, followed by sectors 2 and 3. ..., after the sector numbering of track 0 ends, the starting sectors of track 1 accumulate numbers until the last sector (n sector) of the last track.

For example, a hard disk has 1024 tracks, and each track is divided into 63 sectors. Then the sector number of track 0 is 1~63, and the starting sector number of track 1 is 64. The starting sector number of track 1 is 64. The last sector number is 64512.

There are some differences between hard disks and floppy disks in sector numbering. In one track of a floppy disk, the sector numbers are arranged once, that is, 1, 2, 3...n sectors. Due to the high speed of the hard disk, the magnetic head must transfer the data to the microcomputer after completing reading and writing data in a certain sector. This takes a while, but at this time the hard disk continues to rotate at high speed. When the data transmission is completed, the magnetic head reads and writes. At the second sector, the disk has rotated to another sector. Therefore, in early hard disks, sector numbers were jumped according to a certain interval coefficient.

For more related knowledge, please visit:PHP Chinese website!

The above is the detailed content of What is the physical unit of disk read and write operations?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!