File Management - Operating System

  • File System
    • How to Store & Fetch => Software
    • User > Files > Folder/Directory > File System
    • Stores the File in Sectors by diving into Blocks
    • Types of FS in different OS
      • Windows => NTFS
      • Dos => FAT
      • Unix => Unix
      • Linux => Extended
      • Big Data => ZFS
    • Operations on Files
      • Creating
      • Reading
      • Writing
      • Deleting => Attributes will also be deleted
      • Truncating
      • Repositioning
    • File Attributes/Metadata
      • Name
      • Extension/Type
      • Identifier => Unique no. given by OS
      • Location, Size
      • Modified Date, Created Date
      • Protection/Permission
      • Encryption, Compression
  • Allocation Methods => Allocating to HD after diving a File into Blocks => Purpose is Efficient Data Utilization, Faster Access
    • Contiguous Allocation
      • Directory contains Block name, Start point, Size
      • Easy to implement
      • Excellent Read performance
      • Disk will become Internal/External Fragmented
      • Difficult to grow file
    • Non Contiguous Allocation
      • Linked List Allocation
        • Directory contains Block name, Start point of first Block and that Block will contain Pointer to next Block and so on, Last Block contains NULL Pointer
        • No External Fragmentation
        • File size can increase
        • Large Seek Time
        • Random/Direct access difficult
        • Overhead of Pointers
      • Indexed Allocation
        • Directory contains File name, Index Block
        • Index Block contains address of all other Block of that File
        • Support Direct/Random Access
        • No External Fragmentation
        • Pointer Overhead
        • Multilevel index when one Index Block is not sufficient
        • Unix FS uses INode
  • Unix INode Structure
    • Attributes
    • Direct Block => Points to Data Block
    • Single Indirect => Points to a Block which contains addresses of other Blocks
    • Double Indirect => Points to a Block which again points to a Block which points to Data
    • Triple Indirect
  • Distributed file system
Share: