Homework 7 Solutions

22C:116, Spring 1995

Douglas W. Jones
  1. Solution: Adding the column labeled "Uniprocessor operating system" to Figure 9-13 in Tannenbaum would give the following:
                           Network   Distrib   Multi      Uni
                             OS        OS    Processor Processor
    
    Virtual uniprocessor?    No       Yes       Yes       Yes
    
    All the same OS?         No       Yes       Yes       Yes*
    
    How many copies of OS?   N         N         1         1*
    
    How to communicate?     Files    Messages  Memory    Memory*
    
    Network protocols?      Yes       Yes        No        No*
    
    Single ready list?       No        No       Yes       Yes*
    
    File sharing defined?    No       Yes       Yes       Yes
    
    The asterisks in the new column indicate room for quibbling! A uniprocessor can emulate any number of processors (this is actually a theorem in automata theory, but practical implementations of this idea are embodied in virtual machine operating systems). As a result, a uniprocessor supporting a virtual machine operating system can emulate a multiprocessor or a network of machines supporting either a distributed operating system or network operating systems.

  2. The problem, Part A: Which of the options suggested in Figure 9-13 can be implemented on a network of virtual machines?

    The answer: A network of virtual machines can support any operating system architecture that could be supported on a network of physical machines. That is, both network operating systems and distributed operating systems are possible.

    The problem, Part B: Which of the options suggested in Figure 9-13 are theoretically sufficient to support a recursive virtual machine?

    The answer: The key feature required by a virtual machine is that all the resources used by applications programs be virtualizable. This can clearly be done with a multiprocessor as easily as with a uniprocessor. It might be possible with a distributed operating system, but not with a network of machines running network operating systems. In the latter case, any one of the systems may be virtualizable (since we expect that each machine in the network is a uniprocessor or multiprocessor).

  3. The problem: Outline the sequence of system calls a user program would use to start a new process running a particular bit of code (provided by your program) and with a particular set of links (also provided by your program).

    The answer:

    1. Get link P to process manager.
    2. CREATE link R to myself.
    3. SEND message to P containing R.
    4. RECEIVE reply on R, put link in N.
    5. DESTROY link R.
    6. SEND message to N asking to poke code into memory image.
    7. SEND message to N asking to poke links into link table.
    8. SEND message to N asking to start new process.