Due: April 11, 2022
Remember, you must justify all your answers.
- (5 points) True or False: Time-sharing was not widespread on second-generation computers because the software was not mature enough to implement it.
- (5 points) Fill in the blank: Assuming all jobs arrive at the same time, the non-preemptive job scheduling algorithm
- (5 points) Multiple choice: Which of the following is most true about a multi-level feedback queue?
- It is intended for use when the running time of each job is known.
- It adjusts the priority of a process automatically, based on the amount of time it has run so far.
- It is a pre-emptive version of the shortest job next scheduling algorithm.
- It is the only real-time scheduling algorithm that enables jobs to meet absolute deadlines.
- (5 points) Which of the following system calls does a UNIX/Linux shell use to run commands?
- open(), read(), close()
- open(), fork(), close()
- fork(), exec(), wait()
- fork(), exec(), exit()
Long Answer Questions
- (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?
- Change to user mode.
- Change to kernel mode.
- Read from kernel memory.
- Write into kernel memory.
- Instruction fetch from kernel memory.
- Turn on timer interrupt.
- Turn off timer interrupt.
- (39 points) Assume you have been given the following jobs with the indicated arrival and service times:
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.
|job|| ||arrival time|| ||service time|
|A|| || 0|| || 5|
|B|| || 1|| || 2|
|C|| || 3|| || 7|
|D|| || 5|| || 1|
|E|| || 7|| || 4|
- (20 points) On an interactive system, multiple users may run the same program at the same time.
- Under what conditions can they share the same program instructions in memory?
- Can they share the data in memory? If not, can they share some part of that data?