CSCI 310 Final Exam Spring 2015


  1. API
    1. [4 points] Give two different examples of where the Unix/Linux API has changed since it was created.
    2. [4 points] Explain these changes in the API. What was different and why?
    3. [2 points] Why have these changes occurred?
  2. [5 points] The Unix/Linux exhibits a universality of I/O. What does this mean? How is this manifested in the API? (Give examples)
  3. Files
    1. [4 points] Describe the relationship between the file descriptor table, the open file table and the inode table.
    2. [3 points] Is it possible for two different processes to both point to the same entry in the open file table? How or why not? Given a plausible explanation or series of system calls.
    3. [3 points] Is it possible for two entries in the open file table to point to the same entry in the inode table. How or why not? Given a plausible explanation or series of system calls.
  4. Password files:
    1. [3 points] Describe how the password and shadow password files are employed when a user logs in.
    2. [5 points] Provide a section of code, including system calls, that a login daemon would employ to start a user's initial shell. This should include the calls to obtain necessary information and start required processes.
  5. [2 points] Why is the file name not stored in the inode for a file?
  6. [5 points] Compare and contrast symbolic links and hard links.
  7. [5 points] Describe the action performed by each of the following system calls:
    1. Socket
    2. Bind
    3. Listen
    4. Accept
    5. Connect
  8. [5 points] Our author states that a daemon should close all file descriptors, including standard in, standard out and standard error, and then reopen the three listed as /dev/null. Why? (This is not a single idea answer).