1
h07
CS32 S17
Name:
(as it would appear on official course roster)
Umail address: @umail.ucsb.edu section
Optional: name you wish to be called
if different from name above.
Optional: name of "homework buddy"
(leaving this blank signifies "I worked alone"

h07: Unix & Processses

ready? assigned due points
true Thu 05/25 09:30AM Tue 05/30 09:30AM

You may collaborate on this homework with AT MOST one person, an optional "homework buddy".

MAY ONLY BE TURNED IN IN THE LECTURE/LAB LISTED ABOVE AS THE DUE DATE,
OR IF APPLICABLE, SUBMITTED ON GRADESCOPE. There is NO MAKEUP for missed assignments;
in place of that, we drop the three lowest scores (if you have zeros, those are the three lowest scores.)


https://ucsb-cs32-s17.github.io/hwk/h07/

Reading: Unix & Processses, Reader articles 1 & 3 (by Sarwar)

  1. (10 pts) Fill in the information in the header. The following are required to get the 10 "participation" points.
    • Filling in your name and umail address.
    • WRITING (not circling!) either 11, 12, 1, or 2, to indicate your discussion section (lab) meeeting time.

    Also: For paper submission PLEASE submit on ONE SHEET OF PAPER, double-sided if at all possible. If you must submit on two printed sheets write name on BOTH sheets and no staples, paperclips, or folded corners.

  2. The history of Unix as an OS (and then, the history of all Operating Systems, including those derived from Unix, such as Linux, Mac OS X, etc.) was heavily influenced by the choice of programming language in which Unix was first implemented.
       
    1. (2 pts) What programming language was chosen for the first implementation of Unix?.
    2.  
    3. (2 pts) Most other OS implementations, up to that point in time, had been written in what language?
    4.  
    5. (2 pts) According to the authors, as a direct result of these two facts (your answers to (a) and (b)), Unix had a distinct advantage over other OSes. What was this advantage?
  3. The "machine cycle" is a core concept in computing. There are three steps in this cycle. Each is labelled with the first letter of the step. Briefly describe each step. (We didn't cover this in class, so you will have to read and search!)
       
    1. (2 pts) f:
    2.  
    3. (2 pts) d:
    4.  
    5. (2 pts) e:

  4. (4 pts) A process is a _____________________________ that is _____________________________.
  5. The ps command and the jobs command both list processes. Write a few words that distinguishes between the ways that they are used, that is:
       
    1. (3 pts) What do you type to suspend the current running program?
    2.  
    3. (3 pts) What do you type to resume the suspended program?
  6. You have just built and run an executable using bash (or any shell). Briefly describe these conceps as they apply to running your program. But be specific enough that the grader has NO DOUBT that you have read, listened, and understood.
       
    1. (3 pts) fork
    2.  
    3. (3 pts) exec
    4.  
    5. (3 pts) parent
    6.  
    7. (3 pts) child
  7. The ps command and the jobs command both list processes. Write a few words that distinguishes between the ways that they are used.
       
    1. (3 pts) What is a circumstance where ps is more appropriate than jobs?
    2.  
    3. (3 pts) What is a circumstance where jobs is more appropriate than ps?