[OS notes] file storage space management

The content is based on the notes made during the class review, and the illustrations are mostly from the screenshots of the course

File Storage Management

insert image description here

In fact, the main topic is how to manage the free area and the corresponding usage issues. Right now

  • allocated when in use
  • recycle after use
method Be applicable characteristic
free list method continuous There are different allocation algorithms, and multimedia files may also use this method
Free Disk Chain Discrete The operating system keeps chain head and chain tail pointers
chain of free extents discrete/continuous Same as above, and the free block records the length of the extent and the pointer of the next extent, and the retrieval speed can be improved by explicit linking (building a table)
bitmap discrete/continuous Involving (font size, bit number) to the calculation of the block
group chaining discrete/continuous Suitable for large file systems

Free disk block method: allocate the head of the unchained chain, and recover the tail of the chain.

Bit diagram method: the corresponding bit must be changed before allocation and recycling

Group link method: (essentially a link of a fixed-length stack) allocation and recovery must deal with the situation where the stack is empty and the stack is full. When the stack is full, a new stack must be built and a pointer to the previous stack saved. When the stack is empty during allocation, it must be read into the next stack. The last block has an end mark (one less data is stored)

courseware

insert image description here

insert image description here
insert image description here
insert image description here

insert image description here

insert image description here
insert image description here

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

Guess you like

Origin blog.csdn.net/qq_39377889/article/details/129016107