• There is solely a restricted spaceit's necessary to use the area from deleted files for brand new files.
  • To keep track of free disc space, the system maintains a free house list. The free area list record all disk blocks that square measure free.
  • To create a file, the free-space list has got to be hunted for the desired quantity of area and allotted that area to a brand new file. This house is then far from the free-space list.
  • When a file is deleted, its disc space is more to the free-space list.
There square measure four techniques of free area management:-
  1. Bit vector
  2. Linked list
  3. Grouping
  4. Counting
FREE SPACE MANAGEMENT

1.  Bit vector 

Free knowing the list of free blocks data on the disk the technique used is named bit vector.
  • The free-space list is applied as a bit map or bit vector.
  • Each block is represented by one bit.
  • So, to trace all the free and used blocks on a disk with a complete n block, a touch map or vector having n bit is needed.
EXAMPLE:-
0  1  2  3  4  5  6  7  8  9....
0  1  0  0  1  0  1  0  0  1....

  • If the block is free then the bit is one.
  • If the block is allocated then the bit is  0.
In this disk, blocks 1, 4, 6, 9 are free and blocks and 0, 2, 3, 5, 7, 8 are allocated.

ADVANTAGES OF BIT VECTOR


  • Simple to implement.
  • Easy to get a contiguous file.
  • It is small as possible and kept in the main memory.

DISADVANTAGE OF BIT VECTOR



  • Bit map requires extra space.
  • This methodology is economical if the complete vector isn't unbroken within the main memory.

2.  Linked list

  • The linked list approach links all free disk blocks along.
  • It keeps the pointer to the primary free block. And this block contains a pointer to the next free disk block, and so on.
FREE SPACE MANAGEMENT

ADVANTAGE OF LINKED LIST

  • This methodology has negligible area overhead as a result of there's no would like for a disk allocation table, just for a pointer to the start of the chain.

DISADVANTAGE OF LINKED LIST

  • It is not able for faster access.
  • It can not get contiguous space easily.
  • This plan is not efficient.

3.  Grouping


In the 1st free block is store the addresses of n free books. And then the last one is the disk address of another block.
FREE SPACE MANAGEMENT

ADVANTAGE OF GROUPING

  • The main advantage of this {can is} that address of an oversized variety of free blocks can be found quickly.

4.  Counting

  • It is a modification of the linked-list.
  • In addition, to meet free blocks pointer, keep a pointer saying how many blocks are contiguous free after that block.