Note that under many operating systems, including UNIX, some processes running under the kernel are allowed to execute dangerous operations. This allows certain essential system functions to be handled by code outside the kernel. These processes must be allowed to run in supervisor state.
Things to think about: Think about all the possible ways to implement calls to kernel services on this machine. Two different traps were mentioned. Think about how each of these traps could be used to transfer control to the kernel.
Which kernel-call model allows kernel calls to be coded identically in processes that run in user state and in supervisor statep, and why must kernel calls be coded differently under the other model?
One reason for the tree constraint in UNIX is that it allows straightforward detection of the fact that a file is no longer accessible. With each UNIX file, the system maintains a count of the number of links to that file from various directories. When this count reaches zero, the space occupied by the file can be reclaimed. The UNIX unlink() kernel cal (and the rm shell command) handles this.
Things to think about: Why does the reference-count scheme used by UNIX, in conjunction with the self-links require that a special privileged rmdir utility (a shell command) be used to delete directories, and why is it illegal to use unlink() or rm to delete a link to a directory?
What problem must the CAP file system have solved in order to allow users to construct arbitrarily tangled graphs of links between directories? (Hing: The Java language raises exactly the same problem with regard to objects in the heap!)
Things to think about: What interprocess communication problems does this mechanism solve, and what problems does it leave to the user to solve?
Suppose you, as a user, wanted a message passing model for interprocess communication, where each message was addressed to a particular process; how would you implement this?
Suppose you, as a user, wanted to use UNIX style pipes for interprocess communication, where each pipe could have multiple producers and multiple consumers; how would you implement this?