Operating system file system: 4. File storage space management (free list method, free linked list method, bitmap method, group link method)

mind Mapping

Insert picture description here

File initialization and division

Insert picture description here

The physical disk is divided into multiple file volumes. The
file volume is divided into a directory area and a file area.
File area: store file data.
Directory area: store file directory information (FCB) and information used for disk storage space management

File storage space management method

1. Storage space management-free list method

Insert picture description here

Use a table to record the free blocks in the disk, space recovery and allocation only need to operate on the table

2. Storage space management-free linked list method

Insert picture description here

Free disk block chain:
Insert picture description here
Free disk block chain:
Insert picture description here

3. Storage space management-bitmap method

Insert picture description here
Insert picture description here

A bitmap is used to record the idle state of each physical block, and allocation and recovery are performed on the bitmap

4. Storage space management-group link method

Super block
Insert picture description here

The group link method must have a super block, as the head pointer of all physical blocks of the hard disk, pointing to the next group of free disk blocks.

Insert picture description here

distribution:
Insert picture description here
Insert picture description here

Recycling:
Insert picture description here
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_41587740/article/details/109055716