CS162 Operating Systems Midterm Exam, University of California, Berkeley, Spring 2002, Exams of Operating Systems

The cs162 operating systems midterm exam held at the university of california, berkeley in spring 2002. The exam covers various topics related to operating systems, including short answer questions, cpu scheduling, and concurrency problems. Students are required to answer questions directly on the paper and make their answers as concise as possible.

Typology: Exams

2012/2013

Uploaded on 04/02/2013

shaina_44kin
shaina_44kin 🇮🇳

3.9

(9)

64 documents

1 / 10

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Page 1/10
University of California, Berkeley
College of Engineering
Computer Science Division EECS
Spring 2002 Anthony D. Joseph
Midterm Exam
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
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download CS162 Operating Systems Midterm Exam, University of California, Berkeley, Spring 2002 and more Exams Operating Systems in PDF only on Docsity!

University of California, Berkeley College of Engineering Computer Science Division – EECS

Spring 2002 Anthony D. Joseph

Midterm Exam

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

Total 100

  1. (20 points total) Short answer questions: a. (8 points) What are the two main functions of an operating system? i)

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?

ii) Read the time-of-day clock.

Kernel Kernel and User

Why?

iii) Set the time-of-day clock.

Kernel Kernel and User

Why?

iii) First-come, First-served (run in order 10, 6, 2, 4, 8).

iv) Shortest Job First.

c. (8 points) Five jobs are waiting to be run. Their expected running times are 9, 6, 3, 5, and X. In what order should they be run to minimize average response time? State the scheduling algorithm that should be used AND the order in which the jobs should be run. (Your answer will depend on X).

No Credit – Problem X: (000000000000 points)

The following is an excerpt from a Wall Street Journal article:

  1. A man called the Canon help desk with a problem with his printer. The tech asked him if he was running it under “Windows.” The man responded, “No, my desk is next to the door. But that is a good point. The woman sitting in the cubicle next to me is under a window and her printer is working fine.”
  2. An AST customer was asked to send a copy of her defective diskettes. A few days later a letter arrived from the customer along with photocopies of the floppies.
  3. A Dell customer called to say he couldn't get his computer to fax anything. After 40 minutes of troubleshooting, the technician discovered the man was trying to fax a piece of paper by holding it in front of the monitor screen and hitting the “send” key.
  4. A Dell technician received a call from a customer who was enraged because his computer had told him he was “bad and an invalid.” The tech explained that the computer's “bad command” and “invalid” response's shouldn't be taken personally.
  5. A confused caller to IBM was having troubles printing documents. He told the technician that the computer had said it “couldn’t find printer.” The user had also tried turning the computer screen to face the printer but that his computer still couldn’t “see” the printer.
  6. An exasperated caller to Dell Computer Tech Support couldn't get her new Dell Computer to turn on. After ensuring the computer was plugged in, the technician asked her what happened when she pushed the power button. Her response, “I pushed and pushed on this foot pedal and nothing happens.” The “foot pedal” turned out to be the computer's mouse.
  7. Another customer called Compaq tech support to say his brand- new computer wouldn’t work. He said he unpacked the unit, plugged it in and sat there for 20 minutes waiting for something to happen. When asked what happened when he pressed the power switch, he asked, “What power switch?”
  8. True story from a Novell NetWire Sysop: Tech: “Hello, this Tech Support. How may I help you?” Caller: “The cup holder on my PC is broken and I am within my warranty period. How do I go about getting that fixed?” Tech: “I’m sorry, but did you say a cup holder?” Caller: “Yes, it’s attached to the front of my computer.” Tech: “Please excuse me. If I seem a bit stumped, it’s because I am. Did you receive this as part of a promotional at a trade show? How did you get this cup holder? Does it have any trademark on it?” Caller: It came with my computer. I don’t know anything about a promotional. It just has ‘4X’ on it.” At this point, the Tech Rep had to mute the caller because he couldn’t stand it. He was laughing too hard. The caller had been using the load drawer of the CD- ROM drive as a cup holder and snapped it off the drive.

This page intentionally left blank as scratch space.

  1. (10 points) Deadlock:

Consider a system that starts with a total of 150 units of memory, which is then allocated to three processes as shown in the following table of processes, their maximum resource requirements, and their current allocations:

Process Max Demand Currently Holds P1 70 45 P2 60 40 P3 60 15 P4 60

Determine whether it would be safe to grant each of the following requests. If YES, give an execution order that could be guaranteed possible. If NO, show the resulting allocation table.

a. (5 points) A fourth process arrives, with a maximum memory need of 60 and an initial request for 25 units.

b. (5 points) Using the original table above, a fourth process arrives, with a maximum memory need of 60 and an initial request for 35 units.

This page intentionally left blank as scratch space.

Do not write answers on this page

Do not write answers on this page