当前位置:网站首页>Three ways to allocate disk space
Three ways to allocate disk space
2022-07-25 21:59:00 【Nancy-sn】
at present , Common external memory allocation methods for disks are Continuous distribution 、 Link assignments and Index allocation Three . When using different distribution methods , Different file physical structures will be formed .

1 Continuous distribution
The continuous allocation method requires each file to occupy a continuous set of blocks on the disk , As shown in the figure . The file structure formed in this way is called Sequential file structure , The physical file at this time is called Sequence file . This allocation method ensures that the order of recording in the logical file and the order of disk blocks occupied by the files in the memory are coincident .
2 Link assignments
Link allocation adopts discrete allocation , Eliminate the external debris , Therefore, the utilization rate of disk space is significantly improved ; And because it is based on the current needs of the document , Assign it the necessary disk blocks , When files grow dynamically , It can be reallocated dynamically , Therefore, there is no need to know the size of the file in advance . Besides , The addition of documents 、 Delete 、 It is also very convenient to change .
Link assignment can be divided into implicit link and explicit link .
2.1 Implicit linking
file , Each directory entry in the directory includes pointers to the first disk block and the last disk block of the linked file . Disk blocks are distributed anywhere on the disk , Except for the last disc , Each disk block has a pointer to the next disk block , These pointers are transparent to the user .
2.2 Explicit links
Explicit linking is used to link the pointer of each physical block of the file , Explicitly stored in a linked table in memory . This table only has one set on the whole disk .
3 Index allocation
When opening a file , Just call the number of the disk block number occupied by the file into the memory , There is no need to put the whole FAT Call in memory . So , Put the disk block numbers corresponding to each file together , Index allocation method is an allocation method based on this idea .
3.1 Single level index
It assigns an index table to each file , Record all disk block numbers allocated to the file in the index block , Therefore, the index block is an array containing many disk block numbers . When creating a file , Just fill in the directory entry created for it with a pointer to the index block .
3.2 Multi level index
When the file is too large , Too many index blocks , Single level indexing is inefficient . here , Build another level of index for these index blocks , It is called the first level index , You can also index , It is called the second level index and so on . It is called multi-level index allocation .
3.3 Mixed index allocation
take A combination of multiple index allocation methods And form a distribution mode , Such as direct address , Primary indirect address , Multiple indirect addresses .
边栏推荐
- Protobuf的简单使用
- Bitcoin.com:usdd represents a truly decentralized stable currency
- Guys, how can Flink SQL submit tasks in per job mode?
- [fan Tan] in detail: lower control, upward management, upward drawing cake.
- 919. Complete binary tree inserter: simple BFS application problem
- 成为比开发硬气的测试人,我都经历了什么?
- [51Nod1676 无向图同构]无向图哈希[通俗易懂]
- Share | intelligent fire emergency management platform solution (PDF attached)
- 2年功能测试,却感觉自己什么都不会,2022我该何去何从?
- Unity performance optimization direction
猜你喜欢

Lichuang EDA -- creation of devices 01 resistance (II)

Web3 entrepreneurship has all the elements of explosive growth of innovation

【Redis底层解析】链表类型

开源的RSS订阅器FreshRSS
![[redis underlying parsing] linked list type](/img/e8/c192629dce1a958155a562d216d532.png)
[redis underlying parsing] linked list type

动画曲线天天用,你能自己整一个吗?看完这篇你就会了!

Ijcai2022 meeting! Microsoft and other tutorials on domain generalization

3. Editors (vim)

919. Complete binary tree inserter: simple BFS application problem

IJCAI2022开会了! 微软等《领域泛化Domain Generalization》教程
随机推荐
【leetcode天梯】链表 · 021 合并两个有序链表
立创EDA——我为什么要学EDA
性能调试 -- Chrome Performance
[hand torn STL] unordered_ set、unordered_ Map (encapsulated with hash table)
Basic knowledge in the project
【饭谈】测试平台为什么有组件化?模块化?很多看不到的地方设计的很好是种浪费么?
zigbee开发板(nxpzigbee开发)
2022最新软件测试八股文,能不能拿心仪Offer就看你背得怎样了
Dovecot set mailbox quota
Creation and destruction of function stack frames
[51nod1676 undirected graph isomorphism] undirected graph hash [easy to understand]
I/o case practice
立创EDA——器件的创建01-电阻(二)
Bitcoin.com:USDD代表了真正去中心化稳定币
[hand tear STL] BitSet (bitmap), bloom filter
Why do independent sellers like to do e-mail marketing? The original conversion rate can be improved so much!
c sqlite ... ...
Guys, how can Flink SQL submit tasks in per job mode?
自动化测试岗花20K招人,到最后居然没一个合适的,招两个应届生都比他们强吧
【饭谈】软件测试薪资层次和分段(修仙)