Computer Science 330
Operating Systems
Fall 2020, Siena College
Lecture 0x13: File Systems
Date: Monday, November 2, 2020
Agenda
- Announcements
- The next readings/activities from OS zyBook: Chapter 9, due Friday
- The next Term Project milestone is the progress report due in a week
- Programming Project 3: The Roger Bacon Shell [HTML] [PDF] accepted through Friday without penalty
- Final Exam one week from today
- Lab 8: Working Set Simulation [HTML] [PDF] finish "writeup" for Wednesday
- File Systems
- File system interface
- file concept
- file system - organized collection of files
- file attributes
- file operations
- file types
- Directories - listings of files
- directory concept
- directory operations
- directory organization
- single-level
- two-level
- tree-structured
- acyclic-graph: links/shortcuts/aliases
- general graph: upward-pointing links create cycles
- directory implementation
- Disks and partitions
- a system may have multiple disks, each of which contains
multiple partitions
- we create a file system (more later) in each partition
- mounting: drive letters in Windows, paths in Unix
- In Unix, a virtual file system layer translates generic
paths to the correct partitions (local of varying types,
network-accessible)
- partitioning: why and how?
- File System Implementations
- want to provide: convenience, protection, efficiency
- issues:
- allocation of disk blocks to files/directories
- track available blocks
- do this efficiently
- Disk block allocation methods
- contiguous allocation
- extents
- linked allocation
- variation on linked: file allocation table (FAT)
- indexed allocation
- straightforward implementation
- linked indexed allocation
- two-level index
- Unix inodes
- a combination of the best features of many of the
above
- set aside special disk blocks called inodes (index
nodes)
- inode has entries pointing to direct file blocks, a
single indirect block, a double indirect block, and a
triple indirect block
- a superblock keeps track of inodes and data blocks
- see /usr/src/sys/ufs/ufs/dinode.h in FreeBSD
- Concerns: file size limits, fragmentation, overhead,
performance
- Free Space Management
Examples
Links