prelim1sp06solutions - Name: CS 414 Prelim 1 Solutions...

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

View Full Document Right Arrow Icon
Name: Netid: CS 414 Prelim 1 Solutions This exam is closed book. You have 50 minutes to answer all questions. Show your work for partial credit. 1. Answer TRUE or FALSE (1 point for a correct answer, -0.5 for an incorrect answer) [9] (a) During a DMA transfer of data between device and memory, an interrupt requiring OS intervention will typically occur once for every 16 bytes transferred. F DMA interrupts after transfering a block of data and blocks are much larger than 16 bytes. (b) When running two or more multi-threaded applications on a multi-processor, the highest perfor- mance requires dedicating one CPU for each active user-level thread. Assume that the number of CPUs is C , and that each of the applications has T or fewer current concurrent threads, and that T < = C < 2 * T . T Threads switching between CPUs suffer a lot more cache misses. (c) Studies show that application developers make fewer programming errors when using monitors than when using semaphores. T Monitors were designed to tolerate programming errors. For example additional calls to signal (V()) on semaphore could lead to errors while additional calls to signal on monitors do not. (d) User-mode system call trap instructions should interrupt at a higher priority than the hardware clock. F Quotas can’t be ensured, the user-mode program could take control of the CPU by repeatedly calling system calls. (e) “Return from interrupt” can be allowed in user mode. F Return from interrupt involves updating the program counter. (f) An OS running on a virtual machine monitor will not get interrupts, hence interrupt handler code will never be executed. F The virtual machine monitor reflects the hardware interrupts to the OS. (g) In the “Bakery” mutual exclusion algorithm, the choosing array is used to ensure that if two
Background image of page 1

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

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

This homework help was uploaded on 09/26/2007 for the course COM S 414 taught by Professor Birman during the Spring '06 term at Cornell University (Engineering School).

Page1 / 3

prelim1sp06solutions - Name: CS 414 Prelim 1 Solutions...

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

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