DOC PREVIEW
CORNELL CS 4410 - CS 4410 Homework

This preview shows page 1 out of 2 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CS4410 - Fall 2008 Homework 2 Due September 23, 11:59PM Q1. Explain what goes wrong in the following version of Dekker’s Algorithm: CSEnter(int i) { inside[i] = true; while(inside[j]) { inside[i] = false; while(turn == j) continue; inside[i] = true; } } CSExit(int i) { turn = j; inside[i] = false; } Q2. Round-robin schedulers normally maintain a list of all runnable processes, with each process occurring exactly once in the list. What would happen if a process occurred twice in the list? Can you think of any reason for allowing this? Q3. Five batch jobs A through E, arrive at a computer center at almost the same time. They have estimated running times of 11, 6, 2, 4, and 8 minutes. Their (externally determined) priorities are 3, 5, 2, 1, and 4, respectively, with 5 being the highest priority. For each of the following scheduling algorithms, determine the mean process turnaround time. Ignore process switching overhead. (a) Round-robin (b) Priority scheduling (c) First come, First served (run in order 11, 6, 2, 4, 8) (d) Shortest job first For (a), assume that the system is multiprogrammed, and that each job gets its fair share of the CPU. For (b) through (d) assume that only one job runs at a time, until it finishes.All jobs are completely CPU bound. Assume that the time quantum of the scheduler is 1 minute. Q4. Can we use the test-and-set instruction to implement a lock on a multiprocessor environment? Explain why or why not. Q5. Consider the environment where many user-level threads are mapped to a single kernel thread (i.e., the many-to-one model). Describe a situation the one-to-one model outperforms this


View Full Document

CORNELL CS 4410 - CS 4410 Homework

Download CS 4410 Homework
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view CS 4410 Homework and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view CS 4410 Homework 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?