

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The comprehensive exam questions for operating systems, held in fall 2001. The exam covers various topics including the layered approach to operating system design, page replacement algorithms, and mutual exclusion algorithms. Questions include explaining callbacks, describing different page replacement algorithms, and analyzing peterson's algorithm.
Typology: Exams
1 / 2
This page cannot be seen from the preview
Don't miss anything!


This exam has 4 questions, all of equal value. Answer all the questions to the best of your ability. For each question, keep you answer on the same page (you may use the other side of the page). WRITE YOUR ID ON EACH INDIVIDUAL PAGE. Good luck!
2a. Briefly describe each of the following page replacement algorithms in terms of (1) the page it chooses to evict, and (2) what information the operating system must keep track of, if any, to make that choice.
a) Random (RAND) b) First In First Out (FIFO) c) Least Recently Used (LRU) d) Most Recently Used (MRU)
2b. State which page replacement algorithm the operating system should use to best handle the following applications, and briefly justify your answer.
a) Personal workstation (multiprocessing: mail, text editing, web browsing, applications with good locality) b) Web search engine (single application: gigantic hash tables larger than physical memory, very little locality) c) Web server (single application: nearly every object on the file system is eventually accessed, but accesses have excellent locality) d) Scientific computing (single application: gigantic arrays larger than physical memory) e) TiVo, ReplayTV (single application: storing and replaying compressed video files much larger than physical memory) f) Palmtop, cell phone (multiprocessing: applications fit entirely in physical memory)
process 0: 0.1 while (1) { 0.2 in0 = 1; 0.3 turn = 1; 0.4 while (inl && turn ==1) do; 0.5 critical section 0.6 in0 = 0; 0.7 non-critical section }
process 1: 1.1 while (1) { 1.2 inl = 1; 1.3 turn = 0; 1.4 while (in0 && turn = 0) do ; 1.5 critical section 1.6 inl = 0; 1.7 non-critical section }
a) Suppose that each process sets "turn" to itself (rather than to the other process). That is, line 0.3 is changed to turn = 0 and line 1.3 is changed to turn = 1.
Will this cause the algorithm to violate mutual exclusion? If so, then give an execution in which mutual exclusion is violated. If not, then briefly explain why not.
b) Consider the original algorithm (that is, without line 0.3 and 1.3 changed). Suppose that you run this on a multiprocessor, that does not have sequential consistency. In this multiprocessor, writes to variables are not immediately flushed to (shared) memory but instead can remain for some time in the processor’s data cache.
Will this algorithm continue to ensure mutual exclusion when run on such a multiprocessor? If so, then explain why; if not, then give an execution in which mutual exclusion is violated.
(a) Is this a capabilities based or access control list based access control system (authorization to obtain access to security screening/boarding area)? Explain.
(b) What other aspect of the airline checkin procedure is (also?) an access control list based system? Explain.
(c) Explain the difference between authentication and authorization.