File Systems, Pt. 1 Flashcards
Two File System Design Problems
- Interface (how file system looks to users)
- Implementation (data structures/algorithms to map logical file systems onto physical devices)
File System: Layered Structure
Application programs -> logical file system -> file-organization module -> basic file system -> I/O control -> devices
Logical File System
- View files as logical blocks
- Maintain metadata
File-Organization Module
Maps logical blocks to physical blocks
Basic File System
View data as physical blocks present on devices
I/O Control
- Device drivers and device-specific instructions
- Read/write bit patterns to device controller
From user’s perspective, file is a…
…storage unit
A file is a named collection of…
…related information recorded on a secondary storage
File Attributes
- Name (only information kept in human-readable form)
- Identifier (unique tag identifies file within file system)
- Type (needed for systems that support different types)
- Location (pointer to file location on device)
- Size (self explanatory)
- Protection (rwx)
- Time/date/user identification (for protection and usage monitoring)
Information about files is kept in a…
…directory, which is maintained on the disk as well
Primitive File Operations
- Create
- Write
- Read
- Reposition within file
- Delete
- Truncate
To perform operations on a file, we must first…
…open it (duh)
Directory
- A logical grouping of files
- Contains an entry for each file under it
- Some systems treat directories just as files
Directory Operations
- Search for a file
- Create a file
- Delete a file
- List a directory
- Rename a file
- Traverse the system
Design the directory architecture to achieve:
- Efficiency (quickly locating files)
- Naming (convenient to users; ie. two users can have the same name for different files, the same file can have different names, etc.)
- Grouping (logical grouping of files by properties)