hw3-1

# hw3-1 - algorithms in exercise 2 4 Consider the following...

This preview shows pages 1–2. Sign up to view the full content.

COP4610 Spring 2006 Homework Assignment 3 The material for this homework assignment covers Chapters 5 to 7. 1. Which of the scheduling algorithms FCFS, SJF, RR, or Priority could result in starvation? 2. Consider the following set of processes, with the length of the CPU burst time and arrival time given in milliseconds: Process Arrival time Burst time Priority P 1 0 5 2 P 2 2 3 1 P 3 3 8 5 P 4 3 1 4 P 5 6 2 3 Draw the Gandtt charts to illustrate the execution of the processes using the following scheduling algorithms: FCFS SJF (preemptive) Priority (preemptive) RR with quantum = 3 3. Determine the average waiting time of the processes for each of the scheduling

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: algorithms in exercise 2. 4. Consider the following attempt to solve the mutual exclusion problem: i = process_id(); // pid = 0 or 1 while (true) { while (turn == i) ; // no-op Critical section turn = 1-turn; Remainder section } Variable turn is shared with initial value 0 and variable i is private. Suppose we have two processes, P0 and P1, that want to enter the critical section. Suppose we have only one process that wants to enter the critical section. Describe why the process could deadlock. 5. Textbook exercise 6.8 at page 233....
View Full Document

{[ snackBarMessage ]}

### Page1 / 2

hw3-1 - algorithms in exercise 2 4 Consider the following...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online