More Disk & File Sys
More Disks and File Systems
Overview of concepts related to disks and file systems.
Virtual Address Spaces
Virtual address spaces mapped onto physical memory.
Pages are assigned to frames.
Policies include demand paging, page replacement, and working set management.
Heap Management
The heap is part of a process’s virtual memory and is paged.
Can be managed explicitly or automatically.
I/O Devices
I/O devices are essential for system usability and consist of:
Device, Controller, Bus, and Port.
Disks as a crucial I/O device providing stable storage.
File Systems
Make disks usable with goals of:
Efficiency, usability, and reliability.
Metadata structure includes a superblock and file headers (inodes in Linux/Unix).
File data formats can include contiguous, linked, direct, indexed, linked index, multilevel indexed.
File System Design
Key topics include:
File disk layout
Directories
Locating file data
Workload and optimizations
Discussion of disk operations and latency, featuring FFS and NTFS design considerations.
File Design
Direct Allocation
Files stored in individual blocks, with location info in file header.
Free space managed using a bitmap.
Allocation policies operate on demand.
Evaluation based on access patterns (sequential/random) and fragmentation issues.
Indexed Allocation
Files stored in blocks with index blocks containing pointers to data blocks.
Location information involves an index block linked from the file header.
Bitmap utilized for free space management.
Advanced Allocation Techniques
Multilevel Index Blocks
Used to manage large files with increasing levels of indirection.
Comparison of efficiency related to access patterns and fragmentation.
Visual aids in class to enhance understanding.
Indexed Allocation Benefits
Simplifies file growth and management of large files with flexible pointers.
Multilevel Indexed Files
Structure is a tree with data blocks at the leaves.
Provides efficient access using direct and indirect pointers.
Bitmap for free space management.
Fast File System Example (FFS)
Implemented by UNIX in the 80s.
Inodes contain provable pointers to various data blocks across indirections.
Key Concepts in Multilevel Indexed Files
Efficiency in sequential reads and adaptability to file size variance.
Simple implementation and fixed structures suitable for various contexts.
BigFS Example
File representation with various pointer levels and maximum sizes.
Directories
Directories, commonly referred to as folders, create a namespace for files.
They map file names to file numbers, representing physical file locations.
Only modifiable in kernel mode to ensure integrity.
Directory Strategy Overview
Make-It-Work Strategy: Single name space across the disk.
Simple User-Based Strategy: Individual directory for each user to prevent name reuse.
Multi-level Directories: Offers a hierarchical structure for modern OSs, facilitating user organization.
File Retrieval Process
Steps to locate a file header (inode) by navigating through directories associated with file paths.
Example walkthrough of finding a specific file using directories.
Disk Access Workload Quantification
Analysis of disk accesses needed for a file retrieval, highlighting potential latency issues.
Communication with I/O Devices
Overview of the OS communication via controllers and method types:
Polling: Continual checking of device status until idle.
Interrupts: Device interrupts CPU upon operation completion to minimize CPU idle time.
Direct Memory Access (DMA): Device writes directly to memory, enhancing transfer efficiency.
Latency and Disk Operations
Detailed look at seek, rotation, and transfer times affecting access speeds.
NTFS Overview
Introduced in 1993 for Windows, featuring:
Variable depth tree for file representation.
Master File Table (MFT) for metadata storage, accommodating growing files dynamically.
Summary
The performance of file systems relies on locality heuristics, organization, and structures like FFS and NTFS to minimize latency.
Emphasis on the mechanical sympathy notion in system design reflecting hardware capabilities.