CSCI 311 Test 2 Spring 2017


  1. User Accounts
    1. [3 points] What is the importance of the userid in a linux system?
    2. [2 points] How is the userid mapped to the login name in a linux system?
  2. Files
    1. [3 points] Describe the type of information returned by the stat system call.
    2. [2 points] What somewhat surprising information is not returned by the stat system call?
    3. [3 points] Compare and contrast hard links and symbolic links.
    4. [2 points] Give a situation where a symbolic link will solve a problem which can not be solved using a hard link.
  3. [10 points] Give pseudo-code (including system calls) for a program which given a directory as a command line argument, will report any files in that directory which are not associated with a login name.
  4. Signals
    1. [2 points] Describe two ways signals can be generated.
    2. [2 points] What is the difference between blocking a signal and ignoring a signal?
    3. [2 points] What two signals can not be blocked or ignored? Why is this?
    4. [4 points] List two primary differences between the signal system call and with the sigaction system calls.
  5. [5 points] List/describe three suggested methods for handling signals calls. Why is it suggested that signals be handled in this way?

    Over Please



    Name ___________________________________________
  6. [10 points] For each task in the first column place place the letter corresponding to a programming language in the second column which would be best to complete the task. You may use each language more than once. For the last four blanks, provide a description of a task which matches the provided language.
    TaskLanguage
       Write a Compiler B Bash
     Create a program which transforms the output data from a disease propagation simulation running on a computer cluster, combines this with a map data file to produced an interactive web page.    
     Finds all files on a system created by a given user and moves these files to an archive directory. C C/C++
     Starting a process after checking for proper configuration and log files.    
     Implement a simulation that models the propagation of a disease as it spreads through a population. P Python
     Developing a prototype web server which displays the entire html file in one pane and all links contained in a file in a separate pane.    
    B

    J Javascript
    C

       
    C

       
    J

       

    Please staple this page, this side up to the top of your test.