sp12mt-solutions

sp12mt-solutions - Page 1/12 University of California...

Info iconThis preview shows pages 1–3. 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
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Page 1/12 University of California, Berkeley College of Engineering Computer Science Division – EECS Spring 2012 Anthony D. Joseph and Ion Stoica Midterm Exam Solutions March 7, 2012 CS162 Operating Systems Your Name: SID AND 162 Login: TA Name: Discussion Section Time: General Information: This is a closed book and one 2-sided handwritten note examination. You have 80 minutes to answer as many questions as possible. The number in parentheses at the beginning of each question indicates the number of points for that question. You should read all of the questions before starting the exam, 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. If there is something in a question that you believe is open to interpretation, then please ask us about it! Good Luck!! QUESTION POINTS ASSIGNED POINTS OBTAINED 1 20 2 20 3 15 4 20 5 15 6 10 TOTAL 100 CS 162 Spring 2012 Midterm Exam March 7, 2012 Solutions Page 2/12 1. (20 points total) Short answer questions. a. (8 points) True/False and Why? CIRCLE YOUR ANSWER. i) A lightweight process with one thread is equivalent to a heavyweight process. TRUE FALSE Why? TRUE . A heavyweight process has only one thread. The correct answer was worth 2 points and the justification was worth an additional 2 points. ii) Demand paging requires the programmer to take specific action to force the operating system to load a particular virtual memory page. TRUE FALSE Why? FALSE . The OS automatically loads pages from disk when necessary. The correct answer was worth 2 points and the justification was worth an additional 2 points. b. (8 points) Two-level Page Tables: i) Give a two to three sentence description of a two-level page table. A two-level page table uses two levels of page tables where a pagetable pointer points to the top-level table. Entries in the top-level table point to the lower-level page tables. The lower level tables contain PTEs pointing to the physical locations. ii) Briefly (2 sentences) state one advantage AND one disadvantage of two-level page tables. Advantage: Can map sparse address spaces efficiently Disadvantage: Requires an additional memory reference to translate virtual to physical addresses. CS 162 Spring 2012 Midterm Exam March 7, 2012 Solutions Page 2/12 1. (20 points total) Short answer questions. a. (8 points) True/False and Why? CIRCLE YOUR ANSWER. i) A lightweight process with one thread is equivalent to a heavyweight process. TRUE FALSE Why? TRUE . A heavyweight process has only one thread. The correct answer was worth 2 points and the justification was worth an additional 2 points. ii) Demand paging requires the programmer to take specific action to force the operating system to load a particular virtual memory page....
View Full Document

This note was uploaded on 03/12/2012 for the course CS 162 taught by Professor Kubiatowicz during the Spring '02 term at Berkeley.

Page1 / 12

sp12mt-solutions - Page 1/12 University of California...

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