Homework 2

Due Monday Sep. 9, 11:59pm

55 points

  1. (10 points) Which of the following instructions should be privileged?
    1. Set value of the interval timer.
    2. Read the time-of-day clock.
    3. Set the time-of-day clock.
    4. Clear arbitrary memory.
    5. Turn off interrupts.
    6. Switch from user to monitor mode.
  2. (10 points) What is the purpose of system calls?
  3. (10 points) What is the purpose of system programs?
  4. (10 points) (Textbook exercise 2.7)
    1. What is the purpose of the command interpreter?
    2. Why is it usually separate from the kernel?
    3. Would it be possible for the user to develop a new command interpreter using the system-call interface provided by the operating system?
Answer these questions (5 points each) by consulting the man pages on pyrite.
  1. What does the -S option do to the output of the command ls?
  2. What does the utility tr do?
  3. What do the head and tail utilities do?

Please name your file hw2.txt and use

  turnin352 hw2