Sarah Diesburg Operating Systems COP 4610 Homework 9 Sarah Diesburg Operating Systems COP 4610
Hierarchical Name Space To access the data content of /pets/cat.jpg The system needs to perform the following disk I/Os 1. Read in the file header for the root directory ‘/’ Stored at a fixed location on disk /
Hierarchical Name Space To access the data content of /pets/cat.jpg The system needs to perform the following disk I/Os 2. Read the first data block for the root directory Lookup the directory entry for pets / pets
Hierarchical Name Space To access the data content of /pets/cat.jpg The system needs to perform the following disk I/Os 3. Read the file header for pets / pets pets
Hierarchical Name Space To access the data content of /pets/cat.jpg The system needs to perform the following disk I/Os 4. Read the first data block for the pet directory Lookup the directory entry for cat.jpg / pets pets cat
Hierarchical Name Space To access the data content of /pets/cat.jpg The system needs to perform the following disk I/Os 5. Read the file header for cat.jpg / pets cat pets cat
Hierarchical Name Space To access the data content of /pets/cat.jpg The system needs to perform the following disk I/Os 6. Read the data block for cat.jpg / pets cat pets cat
Hierarchical Name Space So how many disk I/Os do we need to resolve the path? Depends what resolving means 5 to resolve the path (everything but reading the file) 6 if resolving includes reading the first file data block
How would you design your file system differently? If you have infinite number of CPUs? If you have infinite memory size? If you have infinite disk storage? If you have infinite network bandwidth?
File System Components Disk layout Naming Protection Reliability
Infinite Number of CPUs Some of you forgot to think about disk seek and data transfer times These are separate from computational power Use naming schemes that take a lot of computational power E.g., relational, contextual, content-based Hash data block locations Maybe encryption for extra security
Infinite Memory Size Load (cache) all file to data mappings into memory on boot Memory-map files to disk
Infinite Disk Storage Make extra copies for reliability Make extra copies for speed Contiguous or segment-based allocation No longer need to worry about external fragmentation
Infinite Network Bandwidth Automatic remote copy (remote RAID 1?) Store metadata locally (accessed more often), store data remotely (accessed less often)
How would you design a file system for only large files? for only small files? if memory capacity == disk capacity
For large files Multi-level indexed allocation Hash allocation – change to one block won’t affect rest
For small files Indexed allocation Small segmented allocation
Memory capacity = Disk capacity Cache all metadata and files as they are being used