Overview of key topics in file management including structures and systems.
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.
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.
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).
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.
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.
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.
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.
Types of file access methods include:
Indexed sequential, pile, sequential.
Diagram (Figure 12.1) illustrates file system software architecture.
Lowest level of file management:
Direct communication with peripheral devices.
Responsible for initiating and completing I/O operations.
Also called the physical I/O level.
Manages data blocks exchanged with storage devices.
Concerned with data placement and buffering, rather than content understanding.
Handles initiation and termination of file I/O.
Maintains control structures for device scheduling and file statuses.
Facilitates user and application record access.
Provides general-purpose record I/O capabilities.
Closest level of the file system to user.
Standard interface for applications accessing data.
Different methods correspond to file structures and access styles.
Blocking in Processes: When a process waits.
Blocking in File Systems: Packing data into portions (blocks).
Key aspects of file management include:
Access methods, blocking, disk scheduling, file allocation, and structure management.
Logical structuring of records based on access methods.
Criteria for file organization:
Short access time, ease of update, storage economy, maintenance simplicity, reliability.
Common file organizations include:
Pile
Sequential
Indexed sequential
Indexed
Direct/hashed files.
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.
Simplest file organization form:
Collects data in arrival order.
Records accessed via exhaustive search.
Most common file structure:
Fixed record format; key field identifies records.
Suited for batch applications; easily stored on tape and disk.
Random access supported via an index.
Reduces time to access records; allows multiple indexing levels.
Access through indices only.
Used in time-critical applications (e.g., airline reservations).
Allows direct access to known addresses via hashing.
Suitable for quick access environments.
Investigate internal structures of different file types:
*.JPG, *.MP3, *.DOC, *.XLS.
Classify them into discussed file types.