Home CS439

CS439: Principles of Computer Systems

Discussion Section Problem Set 2

Due in Section on Friday, September 15, 2017

The problem set must be completed before section and brought to section. To ensure that your problem set is turned in correctly and that you receive credit for discussion section, you must follow these guidelines exactly.

  1. Name and briefly describe three OS interfaces.

  2. Given the following piece of code:
       main(int argc, char** argv)
       void forkThem(int n)

    How many processes are created if the above piece of code is run?

  3. How can fairness and throughput be competing goals for a scheduler? Give an example where a fair scheduler makes bad use of the CPU and an example where a high-throughput scheduler is unfair.

  4. Most round-robin schedulers use a fixed size quantum. Give an argument in favor of and against a small quantum.

  5. Open a terminal on a departmental Linux machine. After ensuring that you are in a bash shell, use the time command to measure the time taken by a Linux command that sends output to the screen (and maybe other things as well). You may use any Linux command you like. For instance, a sample run might be (from your Project 0 directory):

    time make

    Inspect the output. Explain the meaning of each line. Is the output as you would expect? Why or why not? Include your command in your answer.