Computer Science 162 - Fall 1995 - Anderson - Midterm 1

Computer Science 162 - Fall 1995 - Anderson - Midterm 1 -...

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

View Full Document Right Arrow Icon
CS 162, Fall 95, Midterm 1 Computer Science 162 Tom Anderson Fall 1995, Midterm 1 Problem 1: (6 points) For each of the following statements, indicate in one sentence whether the statement is true or false, and why. 1. You never need to balance your checkbook, since you can trust the Banker's algorithm to always compute your account balance correctly. FALSE. The Banker's algorithm is used to avoid deadlock and not to see if a bank account is balanced or not. 2. Using segmentation allows you to address a larger amount of virtual memory than using paging. FALSE. The amount of addressable memory is determined by the number of bits of virtual address, not the translation scheme. 3. Virtual memory address translation is useful even if the total size of virtual memory (summed over all programs) is always smaller than physical memory. TRUE. Address translation provides protection. Problem 2: (8 points) Provide a short answer for each of the following questions: 1. In Nachos, executing in an interrupt hander is different from executing in a thread. While a thread can block, suspending its exection, yielding to another thread, an interrupt handler is not allowed to block. Why? An interrupt handler can't block because the interrupt handler runs in the context of the current thread, so: (i) the interrupted thread won't be able to continue until the interrupt returns, (ii) other interrupts aren't allowed until the interrupt returns, and (iii) an interrupt has doesn't have a thread control block or its own stack, and so it can't be pulled on/off the ready list. 2. Can round robin ever be the optimal CPU scheduling strategy, in terms of minimizing average response file:///C|/Documents%20and%20Settings/Jason%20Raft. ..20Fall%201995%20-%20Anderson%20-%20Midterm%201.htm (1 of 5)1/27/2007 3:59:27 PM
Background image of page 1

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

View Full DocumentRight Arrow Icon
CS 162, Fall 95, Midterm 1 time? If so, when (list all cases)? If not, explain why not? Shortest job first is optimal. If round robin ever takes a time slice, it can't be optimal, because SJF never
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/17/2009 for the course CS 162 taught by Professor Kubiatowicz during the Spring '02 term at University of California, Berkeley.

Page1 / 5

Computer Science 162 - Fall 1995 - Anderson - Midterm 1 -...

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