DP

L30_Ch12a

Chapter 12: File Management (Part A: Sections 12.1-12.2)

Page 1: Introduction

  • Overview of key topics in file management including structures and systems.

Page 2: Chapter Overview

  • Key concepts covered in the chapter:

    • File structure

    • File management systems

    • File organization and access

    • Various file types including:

      • The pile

      • The sequential file

      • The indexed sequential file

      • The indexed file

      • The direct or hashed file

    • B-Trees (important)

    • File directories and organization

    • Naming conventions

    • Sharing and access rights

    • Secondary storage management strategies

    • File allocation and free space management

    • Reliability considerations

    • Operating system-specific file management: Android, SQLite, UNIX, and Windows NTFS.

Page 3: Understanding Files

  • Files:

    • Data collections created by users.

    • Crucial part of the OS impacting user interaction.

  • Desirable properties of files include:

    • Long-term existence (stored on secondary storage).

    • Shareable between processes with access permissions.

    • Structured in a hierarchical or complex manner to reflect relationships.

Page 4: File Systems

  • Role of file systems:

    • Store data organized as files.

    • Provide functions for managing files, such as:

      • Create, delete, open, close, read, write.

    • Maintain file metadata (attributes).

Page 5: File Structure Terminology

  • Four key terms in file discussions:

    • Field: Basic data portion containing a single value.

    • Record: Collection of related fields.

    • File: Collection of related records.

    • Database: Wider collection of records managing relationships among data.

Page 6: File Structure Details

  • Field:

    • Basic unit of data; can be fixed or variable length.

  • Record:

    • Related fields treated as a unit. Can vary in length.

  • Database:

    • Collection of similar records, referenced by name, with access controls.

Page 7: Importance of File Management Systems

  • Essential aspects of an OS:

    • Meet data management needs of users.

    • Validate data integrity.

    • Optimize performance for data transfers.

    • Support various storage devices.

    • Minimize data loss risks.

    • Standardized I/O routines for file access.

Page 8: User Requirements in File Management

  • Users need to:

    • Create, delete, read, and write files.

    • Control access to their files.

    • Move data between files.

    • Back up and recover files.

    • Access files by name, not just numeric identifiers.

Page 9: File Access Methods

  • Types of file access methods include:

    • Indexed sequential, pile, sequential.

  • Diagram (Figure 12.1) illustrates file system software architecture.

Page 10: Device Drivers

  • Lowest level of file management:

    • Direct communication with peripheral devices.

    • Responsible for initiating and completing I/O operations.

Page 11: Basic File System

  • Also called the physical I/O level.

  • Manages data blocks exchanged with storage devices.

  • Concerned with data placement and buffering, rather than content understanding.

Page 12: Basic I/O Supervisor

  • Handles initiation and termination of file I/O.

  • Maintains control structures for device scheduling and file statuses.

Page 13: Logical I/O

  • Facilitates user and application record access.

  • Provides general-purpose record I/O capabilities.

Page 14: File Access Method

  • Closest level of the file system to user.

  • Standard interface for applications accessing data.

  • Different methods correspond to file structures and access styles.

Page 15: Important Terminology - "Blocking"

  • Blocking in Processes: When a process waits.

  • Blocking in File Systems: Packing data into portions (blocks).

Page 16: Directory Management and More

  • Key aspects of file management include:

    • Access methods, blocking, disk scheduling, file allocation, and structure management.

Page 17: File Organization and Access

  • Logical structuring of records based on access methods.

  • Criteria for file organization:

    • Short access time, ease of update, storage economy, maintenance simplicity, reliability.

Page 18: File Organization Types

  • Common file organizations include:

    • Pile

    • Sequential

    • Indexed sequential

    • Indexed

    • Direct/hashed files.

Page 19: Common File Organizations

  • Characteristics of different file types:

    • Pile File: Variable-length records, unordered.

    • Sequential File: Fixed format, key-field based.

    • Indexed Sequential: Uses indexes for efficient access.

Page 20: Pile File

  • Simplest file organization form:

    • Collects data in arrival order.

    • Records accessed via exhaustive search.

Page 21: Sequential File

  • Most common file structure:

    • Fixed record format; key field identifies records.

    • Suited for batch applications; easily stored on tape and disk.

Page 22: Indexed Sequential File

  • Random access supported via an index.

  • Reduces time to access records; allows multiple indexing levels.

Page 23: Indexed File

  • Access through indices only.

  • Used in time-critical applications (e.g., airline reservations).

Page 24: Direct/Hashed File

  • Allows direct access to known addresses via hashing.

  • Suitable for quick access environments.

Page 25: Homework Assignment

  • Investigate internal structures of different file types:

    • *.JPG, *.MP3, *.DOC, *.XLS.

  • Classify them into discussed file types.