fa11mt - University of California Berkeley College of...

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

View Full Document Right Arrow Icon
Page 1/14 University of California, Berkeley College of Engineering Computer Science Division – EECS Fall 2011 Anthony D. Joseph and Ion Stoica Midterm Exam October 13, 2011 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 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 12 2 42 3 18 4 28 TOTAL 100
Image of page 1

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

View Full Document Right Arrow Icon
CS 162 Fall 2011 Midterm Exam October 13, 2011 Page 2/14 1. (12 points total) Short answer questions: a. (4 points) List the four requirements for deadlock: We gave one point for each requirement for deadlock. b. (3 points) Operating System terms. i) (1 point) List a synchronization mechanism that is an abstraction of a counting number (non-negative integer). 1 point for correctly described term; in very few cases we gave partial credit. ii) (1 point) What is the portion of a process’ code that manipulates shared variables? 1 point for correctly described term; in very few cases we gave partial credit. iii) (1 point) What is the OS data structure that represents a running process? 1 point for correctly described term; in very few cases we gave partial credit. c. (5 points) What are the differences between a Hoare monitor and a Mesa monitor? Your answer should be brief (no more than 3 sentences). For Hoare Monitors we gave 1 point for transfer lock, 1 point for transfer cpu, and 1 point to thread being woken. For Mesa Monitors, we gave 1 point for putting the thread into ready queue, and 1 point for rechecking the condition and content for resources (1pt) We subtracted 1pt for mentioning that the lock and cpu are not transferred for Mesa monitors.
Image of page 2
CS 162 Fall 2011 Midterm Exam October 13, 2011 Page 3/14 2. (42 points total) CPU Scheduling. a. (4 points) Provide a brief definition of what are preemptive and non-preemptive scheduling policies. Your answer should not exceed four sentences. We gave 2 points for defining preemptive scheduling (i.e., "scheduler can take away CPU from the job before the CPU burst is over), and 2 points for defining the nonpreemptive scheduling (i.e., "jobs run until they explicitly yield the resource"). We took away 1 point for each obviously incorrect statement, e.g. "preemptive scheduling tries to minimize job completion time". b. (3 points) Why is SJF or SRTF scheduling difficult to implement in a real OS?
Image of page 3

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern