Home  >  Article  >  What is the unit used by the operating system to perform read and write operations on the disk?

What is the unit used by the operating system to perform read and write operations on the disk?

青灯夜游
青灯夜游Original
2022-07-04 15:05:2428485browse

The unit used by the operating system to perform read and write operations on the disk is "sector". Each track on the disk is divided into several arc segments, and these arc segments are the sectors of the disk. The operating system performs read and write operations on the disk in units of sectors. A sector is the smallest physical unit for storing information on a disk. Usually the capacity of a sector is 512B.

What is the unit used by the operating system to perform read and write operations on the disk?

The operating environment of this tutorial: Windows 7 system, Dell G3 computer.

The unit used by the operating system to perform read and write operations on the disk is sector.

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. Typically, the capacity of a sector is 512B.

The operating system performs read and write operations on the disk in units of sectors. A sector is the smallest physical unit for disk storage information.

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 is usually identified by a range. For example, 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 use sectors as units when reading and writing data to the disk. On the disk, the DOS operating system allocates disk space to files in "cluster" units. 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, which uses 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 hard disk with a gigabyte capacity will The amount of wasted disk space can reach hundreds of megabytes.

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. The sector number of track 0 is 1~63, the starting sector number of track 1 is 64, and the last sector number of the last track 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 the FAQ column!

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

Statement:
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