CSCI 4320 (Principles of Operating Systems), Fall 2001:
Homework 5

Assigned:
November 20, 2001.

Due:
November 29, 2001, at 5pm. Not accepted late.

Credit:
20 points.

Reading

Be sure you have read (or at least skimmed) chapter 6.


Problems

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.

  1. (5 points) Is the open system call absolutely essential in Unix? What would happen if there were no such system call? (For example, would it still be possible to read and write from files? Would there be performance implications?)

  2. (5 points) Consider a simple operating system that provides only a single-level directory, but allows the directory to contain as many files as desired, with file names as long as desired. Would it be possible to use this system to simulate something resembling a hierarchical file system? How?

  3. (5 points) Consider a digital camera that records photographs in some non-volatile storage medium (e.g., flash memory). Photographs are recorded in sequence until the medium is full; at that point, the photographs are transferred to a hard disk and the camera's storage is cleared. If you were implementing a file system for the camera's storage, what strategy would you use for file allocation (contiguous, linked-list, etc.) and why?

  4. (5 points) The textbook describes two strategies for keeping track of free blocks in a file system, one using a list of free blocks and one using a bitmap. What would happen if this free list or bitmap was completely lost because of a system crash -- is there a way to recover, or must you hope you have a backup of any critical data? Answer separately for file allocation using i-nodes and file allocation using a FAT.



Berna Massingill
2001-11-20