Homework 1 Revision 1

The due date has been changed to April 13, 2022.

Due: April 13, 2022
Points: 100

Remember, you must justify all your answers.

Short-answer

  1. (5 points) True or False: Time-sharing was not widespread on second-generation computers because the software was not mature enough to implement it.

  2. (5 points) Fill in the blank: Assuming all jobs arrive at the same time, the non-preemptive job scheduling algorithm                          is optimal.

  3. (5 points) Multiple choice: Which of the following is most true about a multi-level feedback queue?
    1. It is intended for use when the running time of each job is known.
    2. It adjusts the priority of a process automatically, based on the amount of time it has run so far.
    3. It is a pre-emptive version of the shortest job next scheduling algorithm.
    4. It is the only real-time scheduling algorithm that enables jobs to meet absolute deadlines.

  4. (5 points) Which of the following system calls does a UNIX/Linux shell use to run commands?
    1. open(), read(), close()
    2. open(), fork(), close()
    3. fork(), exec(), wait()
    4. fork(), exec(), exit()

Long Answer Questions

  1. (21 points) Protecting the resident monitor is crucial to a correctly operating computer system. Providing this protection is the reason behind multiple mode operation, memory protection, and the timer. To allow maximum flexibility, however, we would also like to place minimal constraints upon the user. The following is a list of operations which are normally protected. What is the minimal set of instructions which must be protected?
    1. Change to user mode.
    2. Change to kernel mode.
    3. Read from kernel memory.
    4. Write into kernel memory.
    5. Instruction fetch from kernel memory.
    6. Turn on timer interrupt.
    7. Turn off timer interrupt.

  2. (39 points) Assume you have been given the following jobs with the indicated arrival and service times:
    job    arrival time    service time
    A     0     5
    B     1     2
    C     3     7
    D     5     1
    E     7     4
    When and in what order would these jobs run if the scheduling algorithm were a multi-level feedback queue with 2 levels, both round robin, and quanta 1 on the first level and 3 on the second? Assume that if events are scheduled to happen at the same time, new arrivals precede terminations, which precede quantum expirations.

  3. (20 points) On an interactive system, multiple users may run the same program at the same time.
    1. Under what conditions can they share the same program instructions in memory?
    2. Can they share the data in memory? If not, can they share some part of that data?


UC Davis sigil
Matt Bishop
Office: 2209 Watershed Sciences
Phone: +1 (530) 752-8060
Email: mabishop@ucdavis.edu
ECS 150, Operating Systems
Version of March 30, 2022 at 5:44PM

You can also obtain a PDF version of this.

Valid HTML 4.01 Transitional Built with BBEdit Built on a Macintosh