File Systems Flashcards
File Systems
[12pts] Choose 3 file layouts and show how each would represent a 44KB file in a system of 4KB blocks.
(a) Contiguous allocation - stores the beginning sector and a length of 44 kb
(b) FFS (fast file system)
10 direct pointers to 4kb of data each
One indirect pointer that has a reference to one more direct pointer to the last 4kb of data
(c) Direct allocation - stores 11 direct pointers to 11 different blocks from the inode itself.
File Systems
You buy a new hard drive and format it as a Fast File System.
- [4pts] Describe the layout of the disk before user files are added.
(a) Master Boot Record
(b) Partition Table
(c) Partitions
Each partition has:
(a) boot block
(b) key parameters of the file system (type, etc.)
(c) super block
(d) free space management
(e) inode bitmap
(f) root
You buy a new hard drive and format it as a Fast File System.
- [4pts] List the steps necessary to create a user file.
(1) Get the root inode
(2) Traverse the path from the root to the end directory
(3) Allocate a sector from the freemap and update the freemap
(4) Create the inode
(5) Update the inode bitmap
(6) Add the file entry to the end directory.
File Systems
In class, we studied the Fast File System and NTFS.
- NTFS is implemented as a flexible tree with extents.
(a) [4pts] What is an extent?
An extent is a range of sectors belonging to a file
(b) [6pts] Describe three ways in which the NTFS flexible tree can be used to represent files.
(a) Data is resident in the record
(b) Data is not resident in the record and there is use of records.
(c) The attribute list is not resident (extents are stored in a different records)
- The Fast File System is implemented as a multilevel indexed file system, which can efficiently access small files while also supporting larger files.
(a) [4pts] How does FFS store small files? You may assume a small file has a size of 40KB or
Less.
Stores them in the 10 direct blocks
(b) [4pts] A file size limit is inherent in the design of FFS. Why?
The depth of the triply indirect block is what limits the file size in FFS.
- [3pts] Name three pieces of file metadata, stored in the file header.
Owner name, File Size, File Permissions
- Which filesystem(s) we studied (specific or type accepted):
(a) [2pts] suffers from external fragmentation?
Contiguous
- Which filesystem(s) we studied (specific or type accepted):
(b) [2pts] can hold a file large enough to fill the entire disk, no matter the disk’s size?
NTFS
- Which filesystem(s) we studied (specific or type accepted):
(d) [2pts] writes all metadata changes to a log?
Journaling File System
- Which filesystem(s) we studied (specific or type accepted):
(e) [2pts] uses direct and indirect pointers?
FFS
- Which filesystem(s) we studied (specific or type accepted):
(f) [2pts] has a rigid file structure?
FFS
- Which filesystem(s) we studied (specific or type accepted):
(g) [2pts] uses block groups?
FFS
- Which filesystem(s) we studied (specific or type accepted):
(h) [2pts] copies data to a new location when that data changes on disk?
Copy-on-write file systems