os06-2nd - Operating System 2nd Exam for 2005 Fall Semester...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Operating System 2nd Exam. for 2005 Fall Semester Date: 12-06-2006, Time: 09:10 a.m.- 10:40 a.m. Name: Student ID: Dept: There are 9 problems in this examination. The weights for each (sub)problem is indicated. Please do all of them. 1. [Basic Concepts] These are 10(a-j) true or false problems. If your answer is false please give the true statement with respect to the original false one. (a) (4%) [Semaphore] A semaphore S is an integer variable that, apart from initialization, is accessed only through two standard atomic op- erations: wait and signal . Although under the classical definition of semaphores with busy waiting the semaphore value is never negative, we may still have negative semaphore values in the implementation. If the semaphore value is negative, its magnitude is the number of pro- cesses waiting on that semaphore. A binary semaphore is a semaphore with an integer value that can range only between 0 and 1 while a counting semaphore its integer value can range over an unrestricted domain. In fact, a counting semaphore can be implemented using bi- nary semaphores. (b) (4%) [Monitors] The signal() operations associated with monitors differ from the corresponding operation defined for semaphores because the signal() operations associated with monitors are not persistent. On the other hand, every signals results in a corresponding increment of the semaphore value even if there are no waiting threads. 2 (c) (4%) [Deadlocks] Given the definition of resource-allocation graph, it can be shown that, if the graph contains no cycles, then no process in the system is deadlocked. If the graph does contain cycle, then a deadlock may exist. This is because if each resource type has exactly one instance, then a cycle does not necessarily imply that a deadlock has occurred. (d) (4%) [Deadlock] A state is safe if the system can allocate resources to each process(up to its maximum) in some order and still avoid a deadlock. As long as the state is safe, the operating system can avoid unsafe (and deadlocked) states. In an unsafe state, the operating sys- tem cannot prevent processes from requesting resources such that a deadlock occurs: The behavior of the processes control unsafe states....
View Full Document

This note was uploaded on 12/29/2009 for the course INFO ENGI 9801 taught by Professor Wu during the Spring '09 term at 東京国際大学.

Page1 / 10

os06-2nd - Operating System 2nd Exam for 2005 Fall Semester...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online