Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Disk Management of Linux system

2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Overview

Magnetic disk refers to the memory that uses magnetic recording technology to store data. Disk is the main storage medium of computer, which can store a large amount of binary data and keep the data from being lost after power loss. In the early days, the disks used by computers were floppy disks, but now the commonly used disks are hard disks, or hard disks. The hard disk consists of three parts, physical structure, data structure and storage capacity.

Hard disk structure

(1) data structure

Sectors: each track on a disk is divided into several arc segments, which are the sectors of the hard disk. The first sector of the hard disk is called the boot sector.

Track: when the disk rotates, if the head remains in one position, each head will draw a circular track on the surface of the disk. These circular tracks are called tracks.

(2) physical structure

Disk: the hard disk has multiple disks, each with 2 sides.

Magnetic head: one magnetic head per side

(3) Storage capacity

Storage capacity of hard disk = number of heads ✖ tracks ✖ number of sectors ✖ bytes per sector

The following figure shows even the structure of the disk

Interface of hard disk

According to the different data interfaces, the hard disk is roughly divided into ATA and SATA as well as SCSI and SAS. The interface speed is not the data transmission speed of the hard disk.

Disk read response time

1. Seek time: the time it takes for the head to move to the track where the data is located. The shorter the seek time is, the faster the operation is. At present, the average seek time of the disk is generally 3-15ms, which is generally around 10ms.

two。 Rotation delay: the time required for disk rotation to move the sector of the requested data below the read-write head, depending on the speed of the disk. Ordinary hard drives are usually 7200rpm, slow 5400rpm.

3. Data transfer time: the time required to complete the transmission of the requested data.

Block / cluster

Disk blocks / clusters (virtual). Block is the smallest logical storage unit in the operating system. The smallest unit in which the operating system deals with disks is the disk block. Popularly speaking, it is called cluster in Windows file systems such as NTFS and block in Linux file systems such as Ext4. Each cluster or block can include 2, 4, 8, 16, 32, 64... 2 to the nth power of sectors.

Why is there a disk block?

Easy to read: because the number of sectors is relatively small, a large number of it is difficult to address, so the operating system combines the adjacent sectors together to form a block, and then operates the block as a whole.

Separate dependence on the underlying layer: the operating system ignores the design of the underlying physical storage structure. Through the concept of virtual disk block, the block is considered to be the smallest unit in the system.

Page

The operating system often communicates with two storage devices, memory and hard disk, similar to the concept of "block", which requires a virtual basic unit. So, with memory operation, it is the concept of a virtual page to act as the minimum unit. Dealing with hard drives is based on blocks as the smallest unit.

The relationship among sectors, blocks / clusters, and page

1. Sector: the minimum read and write unit of a hard disk

two。 Block / cluster: the smallest unit of the operating system for reading and writing to the hard disk

3.page: the smallest unit of operation between memory and the operating system.

Sector

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report