CSE 221: Homework 1

Fall 2017

Hardcopy due Tuesday, October 24 at the start of class

Answer the following questions. For questions asking for short answers, there may not necessarily be a "right" answer, although some answers may be more compelling and/or much easier to justify. But I am interested in your explanation (the "why") as much as the answer itself. Also, do not use shorthand: write your answers using complete sentences.

When grading homeworks, we will grade one question in detail and assign full credit for technical answers to the others.

  1. A fundamental aspect of protection in operating systems is rights amplification. Rights amplification enables a more privileged protection domain to perform an operation on behalf of a less privileged protection domain in a controlled fashion without violating protection in the system. For each of the following operating systems, state (a) the protection domain that they support, (b) the mechanism for crossing protection domains, (c) how rights are represented, (d) how rights are amplified crossing domains, and (e) how the OS determines whether to allow the domain crossing.

    Support your answers with a bit of explanation, such as a concise summary explanation in your own words (a quote of a phrase or sentence from the papers is fine as well). For instance, two possible answers to part (a) for Hydra are:

    A protection domain in Hydra is the "local name space" (LNS). An LNS represents the current set of objects and rights to which a process has access, and those objects and rights change when a process moves from one LNS to another.

    A protection domain in Hydra is the "local name space" (LNS): "At any instant, the execution environment (domain) of a program is defined by an LNS object associated with it...the rights lists in each capability define the permissible access rights of this program at this instant." (Hydra p. 341).

    In other words, we're looking for more than just "local name space" — but at the same time your answers don't have to be lengthy discussions. The balance in the example above is fine.

  2. Operating systems go to great lengths to provide isolation and protection among processes executing on the system. Process debugging, however, represents a necessary, interesting feature that is made more difficult by process isolation and protection, and requires support from the operating system to function correctly. To the extent possible and where appropriate, when answering the following questions support your answers with approaches for debugging support found in the papers you have read to this point (e.g., Tenex, Lampson Protection, Pilot).

    1. Why must a traditional operating system like Unix explicitly provide support (e.g., system calls) for process debugging?
    2. List two distinct operations that a debugger must perform that require support from the operating system.
    3. Because processes are protected and isolated from each other, operating systems must also provide support for communication and coordination among processes. Why can't debuggers just use the support that operating systems already provide for process communication and coordination?
    4. Do language runtime environments like Java and Perl require operating system support for debugging programs in those languages? Why or why not?
    5. When working on an operating system, developers also need to use a debugger on the operating system itself. Why is debugging the kernel of an operating system more challenging than debugging a user-level process? What is one option for where to run a kernel debugger?

  3. Whether or not a file system should incorporate versioning as a fundamental feature provided by the file system is a long-standing question in operating system design. Some operating systems, like Tenex and Plan 9, implement file systems that incorporate versioning in the file system itself; the NetApp filer is a modern example. (Note that with file versioning, a file system need only data blocks of a file that are changed between two versions of a file.) Yet others, notably Unix and the popular operating systems we use today (Linux, Windows, MacOS), implement file systems that do not; instead, we use applications like version control systems (svn, git) or cloud storage systems (Dropbox) on top of the file system that keep track of file versions.

    1. First argue why a file system should incorporate versioning as an explicit feature, and justify your argument.
    2. Then argue why a file system should not incorporate versioning, also justifying your argument.
    3. For you personally, in terms of your computing needs, which argument do you find more compelling?