operating-systems file-management
Definition
File Management
File management is the set of services and mechanisms provided by an operating system to control the creation, storage, retrieval, and protection of files. It provides an abstraction that allows users and programs to interact with data as logical units rather than physical disk sectors.
Objectives
The primary goals of a file management system include:
- Efficiency: Minimising access times and storage overhead.
- Persistence: Ensuring data survives beyond the lifetime of the process that created it.
- Sharing: Allowing multiple processes or users to access the same files safely.
- Reliability: Protecting data against hardware failure or corruption.
- Generality: Providing a uniform interface across different physical storage devices.
Elements of the File System
The file system is typically structured in layers:
- User/Program Commands: The API (e.g.,
open,read). - Directory Management: Mapping symbolic names to file identifiers.
- File Structure: Managing logical records and access methods.
- Access Method: Translating record-level requests to block-level requests.
- File Allocation: Mapping logical blocks to physical addresses on secondary storage.
- Free Space Management: Tracking unallocated blocks.
- Device Driver: Interacting with the IO hardware.