当前位置:网站首页>Ext file system mechanism principle
Ext file system mechanism principle
2022-07-03 11:10:00 【MrPeng1991】
https://blog.csdn.net/li_wen01/article/details/105313344
There are many types of file systems ,ext234,windows On NTFS, The CD-ROM file system iso9660,MAC Hybrid file systems HFS, Network file system NFS,Oracle R & D btrfs, Old fashioned FAT/FAT32 etc. .
1 The components of the file system
block appear
Read and write at the bottom of the hard disk io One sector at a time , If you want to read and write a lot of files , It must be slow in sectors , Consumption performance , So hard drives use a concept called logical blocks . Logical blocks are logical , The disk drive is responsible for maintenance and operation , It is not physically partitioned like a sector , The size of a logical block may contain one or more sectors , Each logical block has a unique address , be called LBA Logic Block Address. With logical blocks , The disk controller operates on data in logical blocks , Read and write one logic block at a time , The disk controller knows how to translate logical blocks into corresponding sectors and read and write data .
here we are Linux Operating system hierarchy , A read / write unit, also known as a block, is provided through the file system , The size of the file system data block is generally 1024bytes,1k,2048bytes 2k, or 4096bytes 4k, File system data block is also a logical concept , File system level maintenance , The logical data block of the disk is maintained by the disk controller , File system io The manager knows how to translate its data block into the address of the data block maintained by the disk LBA. For those who use the file system io In terms of operation , For example, reading and writing documents , these io The basic unit of is the data block on the file system , Read and write one file system block at a time . For example, when you need to read one or more blocks , File system io The manager first calculates which disk data blocks these file system blocks correspond to , That is to calculate LBA, Then tell the disk controller which blocks to read , The disk controller translates these blocks into sector addresses , Then read the data from the sector , Then, these sector data are reorganized and written into memory through the hard disk controller .
This article is about file system , Naturally, the focus is on the file system rather than the disk , So what will happen later block Both mean to add the data block of your system , instead of , Logical blocks maintained by disk .
file system block The appearance of makes the reading and writing performance on the file system level greatly improved , And a lot less debris . But its side effect is that it can waste space . Because the file system uses block It's a read-write unit , Even if only 1k size , Will also occupy one block, The rest of the space is completely wasted . Under some business requirements, a large number of small files may be stored , This time a lot of space is wasted .
Despite its shortcomings , But the advantages are obvious enough , Nowadays, hard drives are cheap and performance oriented , Use block It must be .
bmap
边栏推荐
- Multiple IO transfer - preamble
- STM32F1与STM32CubeIDE编程实例-TM1637驱动4位7段数码管
- Error installing the specified version of pilot
- [proteus simulation] 16 channel water lamp composed of 74hc154 four wire to 12 wire decoder
- Activity and fragment lifecycle
- Software testing e-commerce projects that can be written into your resume, don't you come in and get it?
- Win10系统下提示“系统组策略禁止安装此设备”的解决方案(家庭版无组策略)
- What is the salary level of 17k? Let's take a look at the whole interview process of post-95 Test Engineers
- UI自动化测试如何走出困境?价值又如何体现?
- 【蓝桥杯选拔赛真题44】Scratch消灭骷髅军团 少儿编程scratch蓝桥杯选拔赛真题讲解
猜你喜欢

那些一门心思研究自动化测试的人,后来怎样了?

MAUI Developer Day in GCR

那些一門心思研究自動化測試的人,後來怎樣了?

Do you really need automated testing?

Communication software development and Application

Probability theory: application of convolution in calculating moving average

Overview of testing theory

Tencent micro app to get wechat user information

Qt:qss custom qpprogressbar instance

反正切熵(Arctangent entropy):2022.7月最新SCI论文
随机推荐
线性表的双链表
Qt:qss custom QSlider instance
Lecture 1 number field
Imread change image display size
How did I grow up in the past eight years as a test engineer of meituan? I hope technicians can gain something after reading it
你真的需要自动化测试吗?
2022 pinduogai 100000 sales tutorial
The element form shows the relationship between elementary transformation and elementary matrix
触摸与屏幕自动旋转调试
Qt:qss custom qgroupbox instance
Qt:qss custom qheaderview instance
栈,单调栈,队列,单调队列
File upload and download test point
硬 货 | 一改测试步骤代码就全写?为什么不试试用 Yaml实现数据驱动?
使用onvif协议操作设备
图解网络:什么是虚拟路由器冗余协议 VRRP?
Snownlp emotion analysis
How can UI automated testing get out of trouble? How to embody the value?
Redis notes 01: Introduction
ORACLE 11G 单机冷备数据库