Sp01 midterm 1-solutions - University of California,...

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

View Full Document Right Arrow Icon
Page 1/10 University of California, Berkeley College of Engineering Computer Science Division – EECS Spring 2001 Anthony D. Joseph Midterm Exam Solutions March 7, 2001 CS162 Operating Systems Your Name: SID AND 162 Login: TA: Discussion Section: General Information: This is a closed book and notes examination. You have ninety minutes to answer as many questions as possible. The number in parentheses at the beginning of each question indicates the number of points given to the question; there are 100 points in all. 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!! Problem Possible Score 1 12 2 24 3 23 4 18 5 23 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 Spring 2001 Midterm Exam March 7, 2001 Solutions Page 2/10 1. (12 points total) “Lightweight” versus “Heavyweight” processes – Pros and Cons: a. (4 points) List one advantage of running several single-threaded applications as “heavyweight” processes over running the applications as multiple “lightweight” processes, all in one address space. Be explicit, but concise , in your answers. i) 4 points for saying fault tolerance because of protection, 3 points for saying simple to implement and debug without saying why, 2 points for saying no synchronization needed without shared memory (with some justification), and 0 points for saying no synchronization needed without justification. b. (8 points) List two reasons why lightweight processes are better than heavyweight ones. i) 4 points for each of the following reasons: Easier to share data between threads in the same address space than between processes Faster to switch between threads than between processes Sharing of code portion (or other portions) of applications possible versus heavyweight processes (not covered yet) 2 points for modularity, 1 point for less system resources (w/o significant specific advantages) or other minor advantages, and 0 points for concurrency or other statements not specific to lightweight processes. ii) 2. (24 points total) Suppose that we have a multiprogrammed computer in which each job has identical characteristics. In one computation period, T , for a job, half the time is spent in I/O and the other half in processor activity. Each job runs for a total of N periods. Assume that a simple round-robin scheduling scheme is used and that I/O operations can overlap with processor operation. We define the following quantities: Turnaround time = actual time to complete a job. Processor utilization = percentage of time that the processor is active (not waiting).
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 homework help was uploaded on 01/30/2008 for the course CS 162 taught by Professor Kubiatowicz during the Spring '02 term at University of California, Berkeley.

Page1 / 10

Sp01 midterm 1-solutions - 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