Linux File System

Linux supports many number of file systems, that’s why Linux is accepted quickly as one of the best Operating systems.

Linux has the unified interface called as Virtual File system (VFS) which serves as the interface defined in between the OS kernel and the different file systems as illustrated below.

clip_image002

The Virtual file System

  • Supplies the applications with the system calls for file management
  • Maintains the internal structures
  • Passes tasks on to the appropriate actual file system
  • Performance of default actions

Basic Principles

  • Two main factors taken into consideration while designing any file system
    • Speed of access of data and
    • Facility for Random access
      • is made possible by means of the block oriented devices which are divided into specific number of equal sized blocks.
      • When using the blocks, linux uses a buffer cache to speed up the process in random access.
  • In Linux/Unix, the data is stored in a hierarchical file system containing not only files and directories, but also the device files, FIFO (Named pipes), symbolic links and sockets.
  • Every file is represented by a file structure and an inode structure. It is always possible to access a particular file through the inode file with the help of the inode unique number.
  • Directories
    • allow the file system to be given a hierarchical structure. These are also implemented as files, but the kernel assumes them to contain pairs consisting of a filename and its inode number.
    • In older version of unix, it was possible to modify directory files using simple text editor, but for consistency this is no longer available in the new version of Unix.

Structure of UNIX File system

The UNIX file system passes through various processes like

clip_image004

· Boot block

  1. Each file system starts with a boot block. The block is reserved for the code required to boot the operating system.

· Super block

o All information which is essential for managing the file system is held in the superblock

· Inode block

o Contains the inode structure for the files

· Data blocks

o The data blocks contains ordinary files along with the directory entries and the indirect blocks.

In Unix, the separate file systems are not accessed via device identifiers as is the case for other operating systems, but are combined in a hierarchical tree.

The arrangement is made of mounting the file system, which adds another file system to the existing directory tree. A new file system can be mounted to any directory. The original directory is then called as the mount point. Unmounting the file system release the directory structure again.

Comments

Popular Posts