Computer Science Related Others Courses AvailableThe Best Codder.blogspot.com
Posts

File System Structure , Application of each layer

 

File System Structure

File System provide efficient access to the disk by allowing data to be stored, located and retrieved in a convenient way. A file System must be able to store the file, locate the file and retrieve the file.

Most of the Operating Systems use layering approach for every task including file systems. Every layer of the file system is responsible for some activities.

The image shown below, elaborates how the file system is divided in different layers, and also the functionality of each layer.


os File System Structure
  • When an application program asks for a file, the first request is directed to the logical file system. The logical file system contains the Meta data of the file and directory structure. If the application program doesn't have the required permissions of the file then this layer will throw an error. Logical file systems also verify the path to the file.
  • Generally, files are divided into various logical blocks. Files are to be stored in the hard disk and to be retrieved from the hard disk. Hard disk is divided into various tracks and sectors. Therefore, in order to store and retrieve the files, the logical blocks need to be mapped to physical blocks. This mapping is done by File organization module. It is also responsible for free space management.
  • Once File organization module decided which physical block the application program needs, it passes this information to basic file system. The basic file system is responsible for issuing the commands to I/O control in order to fetch those blocks.
  • I/O controls contain the codes by using which it can access hard disk. These codes are known as device drivers. I/O controls are also responsible for handling interrupts.

The file system provides the users efficient access to the disk by allowing convenient storage, location, and retrieval of data. 

The Operating Systems use the layering method for every task including file systems, and every layer is responsible for some activities.

 

The layers are as follows:

  1. Application program
  2. Logical File System
  3. File Organization Module
  4. Basic File System
  5. I\O Control
  6. Devices

 

Application of each layer: 

 

  1. The application program requests for a file, the request is sent to the logical file system. 

 

  1. The logical file system stores the meta data of the file and the directory structure. If the application program does not have the required permissions, then the logical file system shows an error. It is also responsible for verifying the path to the file.

 

  1. Files are stored in the hard disks from where it is to be retrieved. The files are divided into logical blocks. To store and retrieve data from the file, the logical blocks need to be mapped to the physical blocks. This mapping is done by the file organization module. It also looks over space management. The file organization module decided which physical block is to be allocated to the applications.

 

  1. Once the decision is made, it passes the information to the basic file system. The basic file system issues a command to the I\O Control to fetch the blocks.

 

  1. The I\O control handles any interrupts and contains the device drivers to access the hard disk.

Post a Comment

© Operating System . The Best Codder All rights reserved. Distributed by