Assignment 2, due Sept. 9

Solutions

Part of the homework for 22C:112, Fall 2013
by Douglas W. Jones
THE UNIVERSITY OF IOWA Department of Computer Science

On all assignments, your name must be legible as it appears on your University ID card! Assignments are due at the start of class on the day indicated (usually Friday). Exceptions will be by advance arrangement unless there is what lawyers call "an act of God" (something outside your control). Homework must be turned in on paper, either in class or in the teaching assistant's mailbox. Never push late work under someone's door!

  1. Background: Today's cloud computing servers rely on the ability to offer private virtual machines to customers anywhere on the Internet, so that customers who are adversaries can safely share the same physical resources in the cloud without conflict. One of the leading commercial vendors of software to do this is VMware corp.

    a) Virtualization began with virtual memory. In what decade did virtual memory emerge? What was the first system to offer virtual memory? (0.5 points)

    The Ferranti Atlas, which came to market in the early 1960s. The Burroughs 5000 is an alternate answer, coming out at about the same time.

    b) The second step in virtualization was the virtual machine operating system. In what decade was the first virtual machine operating system released (0.5 points)

    The IBM CP/CMS operating system on the 360/67 emerged in the 1960s as a research system. It was commercialized as VM/370 in the early 1970s.

  2. A Quick Question: What is the default shell installed on the departmental Linux servers? The fastest way to answer this is to try the command echo $SHELL after you log into your lab account. (0.5 points)

    The experiment produces the following output, indicating tcsh.

    echo $SHELL
    /bin/tcsh
    

  3. Background: Here is a little shell script, from the executable file script in the current directory:
    #!/bin/tcsh
    echo X $argv
    $argv
    $argv
    

    a) What is the output if you type this shell command? (0.5 points)

    ./script echo hello world
    

    The output is:

    X echo hello world
    hello world
    hello world
    

    b) What is the output if you type this shell command? (0.5 points)

    ./script ./script ./script ./script
    

    The output is:

    X ./script ./script ./script
    X ./script ./script
    X ./script
    X
    X
    X ./script
    X
    X
    X ./script ./script
    X ./script
    X
    X
    X ./script
    X
    X
    

    c) What terminates the recursion? (0.5 points)

    With each recursive call, the parameter list is shifted one place left. Eventually, it is shifted away to be blank, causing termination.