Fa07 midterm 1-solutions - Page 1/18 University of...

Info iconThis preview shows pages 1–5. 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

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: Page 1/18 University of California, Berkeley College of Engineering Computer Science Division EECS Fall 2007 John Kubiatowicz Midterm I SOLUTIONS October 10 th , 2007 CS162: Operating Systems and Systems Programming Your Name: SID Number: Discussion Section: General Information: This is a closed book exam. You are allowed 1 page of hand-written notes (both sides). You have 3 hours to complete as much of the exam as possible. Make sure to read all of the questions first, as some of the questions are substantially more time consuming. Write all of your answers directly on this paper. Make your answers as concise as possible. On programming questions, we will be looking for performance as well as correctness, so think through your answers carefully. If there is something about the questions that you believe is open to interpretation, please ask us about it! Problem Possible Score 1 15 2 17 3 25 4 25 5 18 Total 100 CS 162 Fall 2007 Midterm Exam I October 10, 2007 Page 2/18 [ This page left for ] 3.141592653589793238462643383279502884197169399375105820974944 CS 162 Fall 2007 Midterm Exam I October 10, 2007 Page 3/18 Problem 1: Short Answer [15pts] Problem 1a[2pts]: Name two ways in which processes on the same processor can communicate with one another. If any of the techniques you name require hardware support, explain. 1) Shared memory. Typically requires hardware support for cache coherence and translation mechanisms (page tables). 2) Message passing. Done through kernel, typically doesnt require much hardware support. 3) File System. Hardware support might include the disk, although this is necessary for other uses as well. Problem 1b[2pts]: What is an interrupt? What is the function of an interrupt controller? An interrupt is an electrical signal that causes the processor to stop the current execution and begin to execute interrupt handler code. The interrupt controller is a component between I/O devices and the processor that filters incoming interrupt signals on their way to the processor; among other things, it allows the operating system to mask out certain interrupts to enable the establishment of interrupt priority. Problem 1c[3pts]: Suppose that we have a two-level page translation scheme with 4K-byte pages and 4-byte page table entries (includes a valid bit, a couple permission bits, and a pointer to another page/table entry). What is the format of a 32-bit virtual address? Sketch out the format of a complete page table. 4KB 10 bits 10 bits 12 bits Virtual Address: Offset Virtual P2 index Virtual P1 index 4 bytes PageTablePtr 4 bytes 4KB 10 bits 10 bits 12 bits Virtual Address: Offset Virtual P2 index Virtual P1 index 10 bits 10 bits 12 bits Virtual Address: Offset Virtual P2 index Virtual P1 index Virtual Address: Offset Virtual P2 index Virtual P1 index Offset Virtual P2 index Virtual P1 index 4 bytes PageTablePtr 4 bytes 4 bytes PageTablePtr 4 bytes 4 bytes CS 162 Fall 2007 Midterm Exam I October 10, 2007 Page 4/18 Problem 1d[2pts]:...
View Full Document

This homework help was uploaded on 01/30/2008 for the course CS 162 taught by Professor Kubiatowicz during the Fall '02 term at University of California, Berkeley.

Page1 / 18

Fa07 midterm 1-solutions - Page 1/18 University of...

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

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