linux often uses GDB shortcuts to complete

2023-01-23   ES  

File system Note II, the access speed of the disk drive

Introduction:

The access speed of thedisk when reading and writing data is the dynamic attribute of the disk. This is an important basis for measuring the performance of a disk. The data access time is not simple. The structure not only rely on the rotation speed of the disk, but also depends on the position of the magnetic head at the beginning of the access. This article will combine several measures for data access time.


1. Some parameters of the access speed of the disk drive

1.1, search time

  search time:refers toRead the average time required to move the magnetic tract position of the magnetic head to the required magnetic tract position

twenty one# . In actual search time, the position of the magnetic head and the distance between the magnetic head when the reading and writing request is relying on the read and write request. usUncertain data that the user wants to access the next time, so there is no way to get these data before receiving the interview requirements, so it is often used2 2 2 2This concept.
The average search time is determined by measurement. The value will depend on the physical size and magnetic head of the disk drive component to accelerate and slow down. Find timeUsually 8ms ~ 20ms

Between, and in recent years, it has not changed much.

1.2, magnetic tract switching time

  Magnetic Trail to Magnetic access time:(Track to Track Time) is the time required to measure the magnetic head from one magnetic tract to another. This time is usually in2ms~3msInside. At this time, some information is also called cylinder switch time or magnetic tract switching time.

1.3, rotating delay time

  Rotating delay time:refers to the average time of the required fan surface after reaching the required magnetic tract position when the magnetic head is required to reach the required magnetic tract position. If on average, the required fan surface is a long distance from the magnetic head, and the rotation delay is usually half of the rotation time. The current disk driver’s rotation speed is located 3500 to 10,000 rpm per minute, so the range of rotation delay is within 3ms ~ 8.7ms.

Turn 1W as an example, 1W costs 1 minute, that is, 60s, 6WMS, 1 transfer time 3ms, and its rotation delay is 3ms

1.4, average visit time

Average access time = search time + rotation delay.

1.5, explosion speed

  Explosion speed:Explosion transmission speed = rotation number/s * single magnetic fan number number * single fan byte byte. After the magnetic head reaches the required fan,

The maximum speed of the disk drive output or receive data. The value of this value is equal to the speed of the data bit flow.

Of course, other parts of the system can also generate or receive data at this speed

1.6, sustainable speed

  Sustainable speed:refers to in a paragraphSustainable time data can be accessed at the speed. This parameter is very important to design the system that must be visited (such as video or audio data) that must be made in large files. This value can be estimated from the specifications of the disk drive, but the value also needs to be verified by actual testing.

2, a calculation question

2.1, assume the scene:

A disk has 8 disk surfaces, 1024 magnetic aisles per plate surface, and each magnetic tract has 64 fan surfaces. Assuming that the fan size of the disk is 1KB, the average search time is 8ms, the access time of the magnetic trail to the magnetic tract is 1.5ms, and the rotation speed of the disk driver is 7200rpm. There is no need to move to read and write magnetic heads when accessing a magnetic trail on a magnetic column.

2.2, related issues:

1. What is the capacity of the disk drive?
Answer: Capacity = 8 * 1024 * 64 * 1KB = 512MB

2. What is the average visit time of the disk drive?
Answer: The average access time = search time + rotation delay. Here the time for searching is 8ms, rotating delay to 0.5 * (1000 * 60) / 7200 = 4.17ms. Therefore, it is 12.17ms

3. If the size of each fan surface is 512B, please estimate that the disk driver transmits a 5MB size file. It takes time?
Answer: In order to facilitate calculation, assuming that this file is continuously stored, that is, after using a magnetic column, use the next magnetic column, and on a magnetic column, the magnetic tract is continuously stored one by one. Store. Suppose its starting address is fan number#0, disk surface number#0, and magnetic column number #i. Because 1MB = 1024KB, and a fan is 512B, a 5MB -size file will require 5 * 1024 * 1024 /512 = 10240 fan. A magnetic column has 8 * 64 = 512 fan. Therefore, it was finally moved to the magnetic column I + 19, the disk 8, and the fan surface 63. We also assume that the disk driver buffer is large enough (other parts of the system can receive data with the same speed of disk data transmission speed)
Under the above assumptions, the disk driver needs 8ms to find the operation, that is, it takes 8ms time to find the magnetic column i, and the 4.17ms time is used to wait for the fan to rotate below the magnetic head. 8 * (60 /7200) * 1000 = 66.7ms Time to read all 8 magnetic data on the magnetic column. Finally, the magnetic head will cost 1.5ms to move to the next adjacent magnetic trail (that is, the time of magnetic tract switching). Assuming that there is a rotating delay for each new disk, the access time: [8 + 20 * (4.17 + 66.67 + 1.5) – 1.5] ms = 1453.3ms

4. How much is the outbreak of the disk drive?
Answer: The transmission speed of the outbreak = the number of rotation times/s * the number of single magnetic tract fans * a single fan onte bytes = 7200/60 * 64 * 1kb = 7.5MB/s

Reference materials:
“Philosophy of the Operation System” Zou Hengming

error correction and suggestion
mailbox:[email protected]


source

Related Posts

HDU4628 (state compression DP)

Oracle modify field type method

[Simple filter algorithm] Common filtering algorithm explanation and routine

ORA-01078: Failure in Processing System Parameters problem (Oracle 11G)

linux often uses GDB shortcuts to complete

Random Posts

gateway+nacos dynamic routing shine

Android realizes sliding suspension top effect Shirly

Use NLTK to perform segments

Linux CentOS6.8 Configure static IP detailed map of the liberal arts tutorial atETEND

How to use Matlab to calculate the two -dimensional Fourier transformation of the image