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

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

View Full Document Right Arrow Icon
Page 1/12 University of California, Berkeley College of Engineering Computer Science Division – EECS Spring 2003 Anthony D. Joseph Midterm Exam Solutions March 13, 2003 CS162 Operating Systems Your Name: SID AND 162 Login: TA: Discussion Section: General Information: This is a closed book and notes examination. You have two hours 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 28 2 21 3 12 4 27 5 12 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 2003 Midterm Exam March 13, 2003 Solutions Page 2/12 1. (28 points total) Short answer questions: a. (9 points) List any THREE major components of most modern operating systems (e.g., Unix , Solaris, WindowsNT, Windows2000, or WindowsXP) and briefly describe their role of each. i) 3 points for each, 1 points for name and 2 points for role. Memory management, process management, file management, I/O system management, networking, scheduling, etc. No credit was given for OS functions (e.g., government). ii) iii) b. (9 points) Give a definition of a counting semaphore, and list and describe the valid operations. 3 points for definition, 2 points for each operation. A counting semaphore is a synchronization data structure that can be used to control or limit the number of processes that can access to a critical region. There are three operations that are allowed on a semaphore: 1. Setting the initial value of the semaphore (number of concurrent accesses allowed). 2. P() decrements the semaphore’s counter and either causes the process to wait until the resource is available or allocates the process the resource. 3. V() increments the semaphore’s counter, releasing a waiting process (if any is waiting).
Background image of page 2
March 13, 2003 Solutions Page 3/12 c. (4 points) List the conditions for deadlock. 1 point for each. Limited access, circular chain of requests, no preemption, and multiple independent requests (or “hold and wait”). d. (6 points) Provide definitions for internal and external fragmentation. Draw a picture show internal fragmentation in a pure paging system (not paged segmentation or segmented paging, but only paging). Draw a picture showing external fragmentation in a pure segmentation system. 2 points for each definition, 1 point for each picture. Internal fragmentation: space inside allocated memory that is wasted, typically occurs in paging systems. External fragmentation: space outside of allocated memory that is too small to be
Background image of page 3

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

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

Page1 / 12

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

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

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