CSE 430 Midterm 2, Fall 2004: Operating Systems, Exams of Operating Systems

The questions and instructions for the midterm 2 exam of the cse 430: operating systems course, held in fall 2004. The exam covers topics such as cpu scheduling algorithms, classical synchronization problems, and process coordination. Students are required to answer questions related to gantt charts, average waiting time, scheduling algorithms, dining philosophers problem, and concurrency vs. Fairness.

Typology: Exams

Pre 2010

Uploaded on 09/02/2009

koofers-user-w1f
koofers-user-w1f 🇺🇸

4

(1)

10 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CSE 430
FALL 2004 MIDTERM 2 NAME
1. (30) Scheduling
Given the following processes:
Process # Arrival Time Run Time Priority (1 is highest)
A 0 5 3
B 1 3 2
C 3 2 1
(16) (a) Draw a Gantt chart to illustrate the execution of these processes for each of the following 3 CPU
scheduling algorithms: Shortest Remaining Time First; Preemptive Priority; Round Robin with
q=2 and FCFS.
(b) (5) What is the average waiting time for Round Robin with q=2?
(c) (4) Most modern operating systems include a scheduling ‘aging’ mechanism. What is aging and why
is it used?
(d) (2) What scheduling algorithm does round robin approach as the quantum size approaches infinity?
(e) (3) What determines the practical lower bound on the time quantum for Round Robin process
scheduling and why is this so?
pf3
pf4

Partial preview of the text

Download CSE 430 Midterm 2, Fall 2004: Operating Systems and more Exams Operating Systems in PDF only on Docsity!

CSE 430

FALL 2004

MIDTERM 2

NAME

1. (30) Scheduling Given the following processes: Process # Arrival Time Run Time Priority (1 is highest) A 0 5 3 B 1 3 2 C 3 2 1 (16) (a) Draw a Gantt chart to illustrate the execution of these processes for each of the following 3 CPU scheduling algorithms: Shortest Remaining Time First; Preemptive Priority; Round Robin with q=2 and FCFS. (b) (5) What is the average waiting time for Round Robin with q=2? (c) (4) Most modern operating systems include a scheduling ‘aging’ mechanism. What is aging and why is it used? (d) (2) What scheduling algorithm does round robin approach as the quantum size approaches infinity? (e) (3) What determines the practical lower bound on the time quantum for Round Robin process scheduling and why is this so?

CSE 430 MIDTERM 2 FALL 2004

2. (25 + 3points extra credit) Classical Synchronization Problems For this question use the Addendum to Final Exam which contains four solutions to the dining philosophers problem. (a) (5) Which solution can fail because of deadlock? Why? (b) (5) Of the remaining solutions, assuming entries in semaphore queues are processed FCFS, which solution can lead to starvation? Why? (c) (10) Solutions to synchronization problems exhibit a concurrency vs. fairness tradeoff. Compare solutions 2 and 4 in this respect. Note: You need to state what concurrency is allowed by each solution and what limitation on fairness occurs in each solution. (d) (5) In solution 4 the mutex semaphore provides mutually exclusive access by allowing only one process at a time to execute critical sections of code? What is the shared data area that the critical sections of code access? (e) (extra credit question 3 points) Compare solutions 3 and 4 with respect to concurrency and fairness. As in part (c), you need to state what concurrency is allowed by each solution and what limitation on fairness occurs in each solution. You must include an example of when the allowed concurrency is different.

CSE 430 MIDTERM 2 FALL 2004

4. (25) Deadlock (a) (16) Given the following well-known bridge crossing example of deadlock show that the 4 necessary conditions for deadlock hold. (b) (5) Briefly describe a resource allocation protocol that prevents deadlock by preventing hold and wait from being true. (c) (4) State how this protocol would be used to prevent deadlock in the bridge crossing example above.