Computer Science 330
Operating Systems
Fall 2022, Siena College
Lecture 0x13: File Systems
Date: Monday, December 5, 2022
Agenda
- Announcements
- Exam 2 score improvement opportunity due now
- Advent of Code bonus available up to the morning of our final
exam: gold stars worth 2 points, silver stars worth 1, up to a
total of 20 programming project points
- Programming Project 4: Roger Bacon Shell with Pipes and
Redirection [HTML] [PDF] hard deadline on Wednesday, demos later in
the week and must be completed by Monday, December 12
- Lab 8: Working Set Simulation [HTML] [PDF] due Friday,
December 9, bonus simulator implementation due Monday, December 12
- The next (and last) readings/activities from OS zyBook: Chapter 9, due Friday, December 9
- 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
- Looking at just a few of the exercises for OS zyBook Chapter 8
- Lab and project work
Examples
Links