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

What are the concepts of hard disk?

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

What are the various concepts of hard disk? I believe many inexperienced people are at a loss about it. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

I. order and randomness

How do you define sequential and random access to disks? If the logical block address logical block address (LBA) at the beginning of an IO operation is next to the termination LBA of the last IO operation, it is sequential access, otherwise it is random access. The following picture is more https://en.wikipedia.org/wiki/IOPS.

The logical address is the block address recognized in the program, and the numbering order is incremented. In addition to LBA, there is also a PBA (physical block address), and there is a correspondence between general logic and physical addresses. The physical address is the actual address of the data on disk.

II. HDD

HDD is Hard Disk Drive, the hard disk drive, that is, the ordinary mechanical hard drive, which reads and writes data through the magnetic head. There is a difference between random access and sequential access of HDD. I have written an article on related topics before.

Index vs full table scan

Oh, review again today.

Think of the disk as a disc, on which there is a magnetic head for writing, just like a steel pen. To write something in one position, you need to move the magnetic head to that position first. This operation is called seek (rotation + seek), and the next step is to write down the data sequence (write). After writing the data, the head automatically moves backward. If you continue to write next to each other, you don't need seek.

For example, take a Chinese character as a unit, then write a sentence "Hello to the child" in sequence, only need to seek the magnetic head to the position where "small" is to be written at once, and then write "small", and then directly write the "Hello to the child" to the back one by one, and these words all exist together on the disk. Random writing is to store these words separately and not next to each other. Then a total of 6 times of seek,6 and write are required. Sequential writing is always better than random writing, because random writing takes 5 more seek times.

The seek time of a HDD is 10ms, and the throughput is 100MB/s, that is, the data that can be write 100MB per second. So in 1KB, pure write, the data of 1KB only needs 10us, which is 1, 000 of seek. You can see that seek is very unfriendly.

Because HDD can overwrite, LBA and PBA correspond one to one, and consecutive logical addresses correspond to consecutive physical addresses, so there is a difference between random access and sequential access.

After reading the above, have you mastered the various concepts of hard disk? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

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

Internet Technology

Wechat

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

12
Report