Fa05 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
University of California, Berkeley College of Engineering Computer Science Division EECS Fall 2005 John Kubiatowicz Midterm I October 12 th , 2005 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 25 2 17 3 20 4 18 5 20 Total Page 1/20
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 2005 Midterm Exam I October 12, 2005 [ This page left for π ] 3.141592653589793238462643383279502884197169399375105820974944 Page 2/20
Background image of page 2
CS 162 Fall 2005 Midterm Exam I October 12, 2005 Problem 1: Short Answer Problem 1a[2pts]: Suppose a thread is running in a critical section of code, meaning that it has acquired all the locks through proper arbitration. Can it get context switched? Why or why not? Problem 1b[3pts]: What are some of the hardware differences between kernel mode and user mode? Name at least three. Problem 1c[3pts]: Name three ways in which the processor can transition from user mode to kernel mode. Can the user execute arbitrary code after transitioning? Problem 1d[3pts]: What is a thread? What is a process? Describe how to create each of these. Page 3/20
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 2005 Midterm Exam I October 12, 2005 Problem 1e[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. Problem 1f[2pts]: What needs to be saved and restored on a context switch between two threads in the same process? What if the two threads are in different processes? Be explicit. Problem 1g[1pt]: What is a thread-join operation? Page 4/20
Background image of page 4
October 12, 2005 Problem 1h[3pts]: Name at least three ways in which context-switching can happen in a non- preemptive scheduler. Problem 1i[3pts]: Name three 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 1j[2pts]: What is an interrupt? What happens when an interrupt occurs? What is the function of an interrupt controller? Page 5/20
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.

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 / 20

Fa05 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