Outline for 2/18/98
- Last lecture: finished memory management
- Administrative
- The answer is "not yet"
- Homework 4 on web.
- Program 3 coming soon.
- Objective: overview of file systems issues that we will be covering in next few lectures.
File System Issues
- What is the role of files?
What is the file abstraction?
- File naming. How to find the file we want?
Sharing files. Controlling access to files.
- Performance issues - how to deal with the bottleneck of disks?
What is the "right" way to optimize file access?
Role of Files
- Persistance - long-lived - data for posterity
- non-volitile storage media
- semantically meaningful (memorable) names
Abstractions
*File Abstractions
- UNIX-like files
- Sequence of bytes
- Operations: open (create), close, read, write, seek
- Memory mapped files
- Sequence of bytes
- Mapped into address space
- Page fault mechanism does data transfer
- Named, Possibly typed
Functions of File System
- (Directory subsystem) Map filenames to fileids-open (create) syscall. Create kernel data structures.
Maintain naming structure (unlink, mkdir, rmdir)
- Determine layout of files and metadata on disk in terms of blocks. Disk block allocation. Bad blocks.
- Handle read and write system calls
- Initiate I/O operations for movement of blocks to/from disk.
- Maintain buffer cache
Functions of Device Subsystem
In general, deal with device characteristics
- Translate block numbers (the abstraction of device shown to file system) to physical disk addresses.
Device specific (subject to change with upgrades in technology) intelligent placement of blocks.
- Schedule (reorder?) disk operations
Know your Workload!
- File usage patterns should influence design decisions. Do things differently depending:
- How large are most files? How long-lived?
Read vs. write activity. Shared often?
- Different levels "see" a different workload.
- Feedback loop