CSCI 3323 (Principles of Operating Systems), Fall 2012:
Homework 6
- Credit:
- 10 points.
Be sure you have read Chapter 4.
Answer the following questions. You may write out your answers by
hand or using a word processor or other program, but please submit
hard copy, either in class or in my mailbox in the department office.
- (5 points)
The textbook describes more than one strategy
for keeping track of free blocks in a file system
(free blocks, bitmaps, and FATs).
All of these strategies rely on information that is kept
both on disk and in memory, sometimes with the most-current
information only in memory.
What would happen if the copy on disk of
whatever data structure is used to
keep track of free blocks was lost or damaged
because of a system crash --
is there a way to recover,
or do you have to just reformat the disk and hope you
backed up any really important files?
Answer separately for MS-DOS FAT-16 (which uses a FAT)
and UNIX V7 filesystems (which uses one of the other strategies).
- (5 points)
Consider a UNIX filesystem (as described in section 4.5.3)
in which each i-node contains
10 direct entries, one single-indirect entry,
one double-indirect entry, and
one triple-indirect entry. If a block is 1KB (1024 bytes)
and a disk addresses is 4 bytes, what is the maximum file
size, in KB?
(Hint: Use the blocksize and size of disk addresses
to determine how many entries each indirect block contain.)
Berna Massingill
2012-11-16