Fa07 midterm 1

Fa07 midterm 1 - University of California, Berkeley College...

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

View Full Document Right Arrow Icon
Page 1/18 University of California, Berkeley College of Engineering Computer Science Division EECS Fall 2007 John Kubiatowicz Midterm I 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
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 2007 Midterm Exam I October 10, 2007 Page 2/18 [ This page left for π ] 3.141592653589793238462643383279502884197169399375105820974944
Background image of page 2
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. Problem 1b[2pts]: What is an interrupt? What is the function of an interrupt controller? 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.
Background image of page 3

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

View Full DocumentRight Arrow Icon
CS 162 Fall 2007 Midterm Exam I October 10, 2007 Page 4/18 Problem 1d[2pts]: Which company was the first to develop a workstation with a mouse and overlapping windows? Problem 1e[2pt]: What is a thread-join operation? Problem 1f[2pts]: True or False: When designing a multithreaded application, you must use synchronization primitives to make sure that the threads do not overwrite each other’s registers. Explain. Problem 1g[2pts]: True or False: A system that provides segmentation without paging puts holes in the physical address space, forcing the operating system to waste physical memory. Explain.
Background image of page 4
CS 162 Fall 2007 Midterm Exam I October 10, 2007 Page 5/18 Problem 2: Multithreading [17 pts] Consider the following two threads, to be run concurrently in a shared memory (all variables are shared between the two threads): Thread A Thread B for (i=0; i<5; i++) { x = x + 1; } for (j=0; j<5; j++) { x = x + 2; } Assume a single-processor system, that load and store are atomic, that x is initialized to 0 before either thread starts , and that x must be loaded into a register before being incremented (and stored back to memory afterwards). The following questions consider the final value of x after both threads have completed. Problem 2a[2 pts]:
Background image of page 5

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

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

Page1 / 18

Fa07 midterm 1 - University of California, Berkeley College...

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

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