File Systems

 

To the user, Linux’s file system appears as a hierarchical directory tree obeying UNIX semantics.

Internally, the kernel hides implementation details and manages the multiple different file systems via an abstraction layer, that is, the virtual file system (VFS).

 

The Linux VFS is designed around object-oriented principles and is composed of twocomponents:

 

   1. A set of definitions that define what a file object is allowed to look like

   2. The inode-object and the file-object structures represent individual files

   3. the file system object represents an entire file system

   4. A layer of software to manipulate those objects.

 

Silberschatz, Galvin and Gagne 2002 20.42 Operating System Concepts

 

The Linux Ext2fs File System

 

Ext2fs uses a mechanism similar to that of BSD Fast File System (ffs) for locating data blocks belonging to a specific file.

 

The main differences between ext2fs and ffs concern their disk allocation policies.

   1. In ffs, the disk is allocated to files in blocks of 8Kb, with blocks being subdivided into fragments

       of 1Kb to store small files or partially filled blocks at the end of a file.

   2. Ext2fs does not use fragments; it performs its allocations in smaller units. The default block

       size on ext2fs is 1Kb, although 2Kb and 4Kb blocks are also supported.

   3. Ext2fs uses allocation policies designed to place logically adjacent blocks of a file into

       physically adjacent blocks on disk, so that it can submit an I/O request for several disk blocks

       as a single operation.

 

Ext2fs Block-Allocation Policies

 

                     

 

 The Linux Proc File System

 

The proc file system does not store data, rather, its contents are computed on demand according to user file I/O requests. proc must implement a directory structure, and the file contents within; it must then define a unique and persistent inode number for each directory and files it contains.

   

    1.It uses this inode number to identify just what operation is required when a user tries to read  

       from a particular file inode or perform a lookup in a particular directory inode.

    2.When data is read from one of these files, proc collects the appropriate information, formats it

       into text form and places it into the requesting process’s read buffer.

 

File Systems

 

To the user, Linux’s file system appears as a hierarchical directory tree obeying UNIX semantics.

Internally, the kernel hides implementation details and manages the multiple different file systems via an abstraction layer, that is, the virtual file system (VFS).

 

The Linux VFS is designed around object-oriented principles and is composed of twocomponents:

 

       1.A set of definitions that define what a file object is allowed to look like

       2. The inode-object and the file-object structures represent individual files

       3. the file system object represents an entire file system

       4. A layer of software to manipulate those objects.

 

Silberschatz, Galvin and Gagne 2002 20.42 Operating System Concepts

 

The Linux Ext2fs File System

 

Ext2fs uses a mechanism similar to that of BSD Fast File System (ffs) for locating data blocks

belonging to a specific file.

 

The main differences between ext2fs and ffs concern their disk allocation policies.

 

        1. In ffs, the disk is allocated to files in blocks of 8Kb, with blocks being subdivided into

            fragments of 1Kb to store small files or partially filled blocks at the end of a file.

        2. Ext2fs does not use fragments; it performs its allocations in smaller units. The default block

            size on ext2fs is 1Kb, although 2Kb and 4Kb blocks are also supported.

        3. Ext2fs uses allocation policies designed to place logically adjacent blocks of a file into

            physically adjacent blocks on disk, so that it can submit an I/O request for several disk

            blocks as a single operation.

 

Ext2fs Block-Allocation Policies

 

                        

 

 The Linux Proc File System

 

The proc file system does not store data, rather, its contents are computed on demand according to user file I/O requests. proc must implement a directory structure, and the file contents within; it must then define a unique and persistent inode number for each directory and files it contains.

 

      1. It uses this inode number to identify just what operation is required when a user tries to read

          from a particular file inode or perform a lookup in a particular directory inode.

      2. When data is read from one of these files, proc collects the appropriate information, formats it 

          into text form and places it into the requesting process’s read buffer.

 

 

                                                                                                                                                                                                                   back