Home CS439

CS439: Principles of Computer Systems

Homework 10, Part 1

Due in Section on Friday, April 22, 2016

Part 1 of the homeworks must be completed before section and brought to section. Please refer to the homework turnin instructions.

  1. Suppose a computer system and all of its applications are completely bug free. Suppose further that everyone in the world is completely honest and trustworthy. In other words, we do not need to consider fault isolation.

    • How should the operating system allocate the processor? Should it give all of the processor to each application until it no longer needs it? If there are multiple tasks ready to execute at the same time, should it schedule the task with the least amount of work to do or the most? Justify your answer.
      You may assume a uniprocessor.

    • How should the operating system allocate physical memory between applications? What should happen if the set of applications does not all fit in memory at the same time?

    Note: These are thought questions---you are not expected to determine how operating systems currently solve these problems. Instead, you should think about how you would solve the problem.

  2. Now suppose the computer system needs to support fault isolation. What hardware and/or operating support do you think would be needed to protect an application's data structure in memory from being corrupted by other applications? Assume more than one application may reside in memory at a time.
    (From Anderson and Dahlin, Ch1 question 2.)
    Again, a thought question.

  3. In two-phase commit, suppose the master fails after writing ``GLOBAL_COMMIT'' to disk and sending ``GLOBAL_COMMIT'' to all participating nodes but before any of the nodes receive this message. Suppose that the ``GLOBAL_COMMIT'' message reaches i of the n participants and that the participants implement a protocol in which they communicate with one another when they suspect the primary has died. What is the minimum number of participants that must receive the ``GLOBAL_COMMIT'' message to allow the participants to complete the transaction without waiting for the master to recover?

  4. Sun's network file system (NFS) protocol provides reliability via:
    • at-most-once semantics
    • at-least-once semantics
    • two-phase commit
    • transactions