Operating System Concepts, Seventh Edition

Info iconThis preview shows pages 1–4. 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 2002 Anthony D. Joseph Midterm Exam Solutions March 13, 2002 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 20 2 33 3 24 4 10 5 13 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 2002 Midterm Exam March 13, 2002 Solutions Page 2/10 1. (20 points total) Short answer questions: a. (8 points) What are the two main functions of an operating system? i) (a) Coordinator and traffic cop: Resource allocation and control. (b) Standard services. 4 points for each. 2 points for partial answers. ii) b. (12 points) Which of the following instructions should be allowed only in kernel mode? State whether it is or not (circle one) and why. i) Disable all interrupts. Kernel Kernel and User Why? Kernel only, otherwise a user could take control of the machine. 2 points for each answer and 2 points for reason. ii) Read the time-of-day clock. Kernel Kernel and User Why? Kernel and User, doesn’t affect anything because the operation is read- only. We deducted 2 points if the answer did not mention the read-only nature of the operation iii) Set the time-of-day clock. Kernel Kernel and User Why? Kernel only, could affect scheduling, other processes, and the kernel. Several students mentioned changing their machine’s timezone, however, the access should still be allowed only in the kernel and use a system call.
Background image of page 2
CS 162 Spring 2002 Midterm Exam March 13, 2002 Solutions Page 3/10 2. (33 points total) CPU Scheduling. a. (5 points) The CDC 6600 computers could handle up to 10 I/O processes simultaneously on a single CPU using an interesting form of round-robin scheduling called processor sharing . A context switch occurred after each instruction, so instruction 1 came from process 1, instruction 2 came from process 2, etc. The context switching was done by special hardware, and the overhead was zero. If a process needed T seconds to complete in the absence of competition, what is the maximum amount of time it would need if processor sharing were used with N processes? Assume there are less than 10 processes waiting to run. It will need NT seconds.
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.

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

Sp02 midterrm1-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