Second Exam Spring 2009

Second Exam Spring 2009 - Second Exam Spring 2009 Name...

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 Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Second Exam Spring 2009 March 25, 2009 Name : _____________________________________________________________________ _ Question Maximum Current 1. True/False 11 pts 2. Short questions 4 3. 4 4. 4 5. 4 6. 4 7. 4 8. Programming question 15 Total 50 1. True/False Questions (write F or T) (11 points, 1 point each) __ Semaphores are only initialized with a count >= 0 __ “cond_wait” needs to be called inside a testing loop __ Heap-allocated memory can be shared between threads __ The calls sema_wait and sema_post are different in that sema_post must be called inside a critical section. __ Mutexes must be unlocked always in the same order to avoid a deadlock __ The read/write lock implementation discussed in class allows simultaneous lock acquisition by different writers. __ An iterative server passes slave sockets in round-robin fashion to a pool of threads. __ Thread-safe code is always re-entrant. __ The principle of least common mechanism warns against sharing resources between services of different importance. __ Different threads in the same process can run different algorithms. __ Monitors are a fair synchronization mechanism. Short Questions 2. Describe a situation in which you would use spinlocks. _____________________________________________________________________ ____________ _____________________________________________________________________ ____________ _____________________________________________________________________ ____________ _____________________________________________________________________ ____________ _____________________________________________________________________ ____________ _____________________________________________________________________ ____________ 3. Which information does the OS need to keep track of when a process opens files, 3....
View Full Document

{[ snackBarMessage ]}

Page1 / 7

Second Exam Spring 2009 - Second Exam Spring 2009 Name...

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