Some of the crucial tasks the file system is responsible for handling include the following:
- File Structure
- We have various data structures in which the file can be stored. The task of the file system is to maintain an optimal file structure.
- Recovering Free space
- Whenever a file gets deleted from the hard disk, there is a free space created in the disk. There can be many such spaces that need to be recovered in order to reallocate them to other files.
- Disk space assignment to the files
- The major concern about the file is deciding where to store the files on the hard disk. There are various disk scheduling algorithms put in place to handle this.
- Tracking data location
- A File may or may not be stored within only one block. It can be stored in the non-contiguous blocks on the disk. We need to keep track of all the blocks on which the part of the files resides.