Free Space Management in Operating System - CodeTextPro

free space management in operating system or
Free space management of file system:
In this article, we will learn about free space management and some techniques to implement operating system list, free space management in os.




  • Since disk space is limited, we need to reuse the space from deleted files for new files, if possible.
  • To keep track of free disk space, the system maintains a free-space list.
  • The free-space list records all free disk blocks – those not allocated to some file or directory.
  • To create a file, we search the free-space list for the required amount of space and allocate that space to the new file.
  • This space is then removed from the free-space list.
  • When a file is deleted, its disk space is added to the free-space list.


We discuss here some techniques for free space management.


1. Bit vector or Bit table:
A bit vector is a collection of bits, in which each block is represented by one bit. If the block is free, the bit is 0.If the block is allocated, the bit is 1. For example consider a disk where blocks 5, 8, 16, 20 are free, the free space bit vector would be



2. Chain free points or Linked free space list:
Another approach is to link all the free space blocks together, keeping a pointer to the first free block. This block contains a pointer to the next free disk block and so on.


3. Indexed block list:
The chained or linked free portion is not very efficient since to traverse the list, we must read each block requiring substantial I/O time. A modification of this approach would store the address of n free blocks in the first free block.

The main advantage of this method is that the address of a large number of free blocks can be found quickly.



Important part of memory management

Definition of Segmentation:

Like Paging, Segmentation is also a memory management scheme. It supports the user’s view of the memory. The process is divided into the variable size segments and loaded to the logical memory address space.

The logical address space is the collection of variable size segments. Each segment has its name and length. For the execution, the segments from logical memory space are loaded to the physical memory space.




Post a Comment

0 Comments