Docsity

Midterm Exam for Computer Operating Systems | COP 4610, Exams of Operating Systems

Toggle sidebar
bg1
COP 4610 Computer Operating Systems
Summer 2009 Name: ______________________________
Midterm Last 5 digits of ZN: Zxxx __ __ __ __ __
This is a CLOSED books/notes test. You are NOT allowed to consult any material you have
brought into the classroom. NO exchange of information is allowed among students. Write
your name and ZN on each sheet detached.
1. Which of the following instructions should be privileged? Circle the correct answer for
each one. (10 pts.)
a) Set value of timer yes / no
b) Read the Clock yes / no
c) Clear memory yes / no
d) Issue a trap instruction yes / no
e) Turn off interrupts yes / no
f) Modify entries in device-status table yes / no
g) Access I/O device yes / no
2. Briefly describe the differences among short-term, medium-term, and long-term
scheduling? (10 pts.)
.
pf3
pf4

Partial preview of the text

Download Midterm Exam for Computer Operating Systems | COP 4610 and more Exams Operating Systems in PDF only on Docsity!

COP 4610 Computer Operating Systems

Summer 2009 Name: ______________________________

Midterm Last 5 digits of ZN : Zxxx __ __ __ __ __

This is a CLOSED books/notes test. You are NOT allowed to consult any material you have brought into the classroom. NO exchange of information is allowed among students. Write your name and ZN on each sheet detached.

  1. Which of the following instructions should be privileged? Circle the correct answer for each one. (10 pts.)

a) Set value of timer yes / no b) Read the Clock yes / no c) Clear memory yes / no d) Issue a trap instruction yes / no e) Turn off interrupts yes / no f) Modify entries in device-status table yes / no g) Access I/O device yes / no

  1. Briefly describe the differences among short-term, medium-term, and long-term scheduling? (10 pts.)
  1. What is the main advantage of the microkernel approach to system design? (10 pts.)
  2. How many new processes will be created after the following program is invoked? Draw a diagram to support your answer. (15 pts.)

#include <stdio.h> #include <unistd.h>

int main() { /* fork a child process */ fork();

/* fork another child process */ fork();

/* and fork another */ fork();

/* and fork again */ fork();

return(0); }

  1. Suppose that the following processes arrive for execution at the times indicated. Each process will run the listed amount of time.

Process Arrival Time Burst Time

P 1 0.0-^3 P 2 1.0-^6 P 3 2.0-^4 P 4 4.0-^1 P 5 7.0-^2

Compute the average turnaround time and average waiting time for each of the following scheduling algorithms. Show work. (20pts.)

a. FCFS b. Non-preemptive SJF c. Preemptive SJF d. RR (quantum = 2)

Note: The minus ( -^ ) sign to the right of an arrival time refers to a very small amount of time prior to the indicated time.