Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Midterm Exam | Introduction to Operating Systems | CS 1550, Exams of Computer Science

Material Type: Exam; Class: INTRO TO OPERATING SYSTEMS; Subject: Computer Science; University: University of Pittsburgh; Term: Fall 2005;

Typology: Exams

Pre 2010

Uploaded on 09/02/2009

koofers-user-hy2-1
koofers-user-hy2-1 🇺🇸

10 documents

1 / 7

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS 1550 Fall 2005/6 (06-1) Mid-Term Examination
Wednesday 11th October 2006
Name:
E-Mail: ___________________@pitt.edu
The expected duration of this exam is one hour and ten minutes (class duration).
This exam is closed-everything (this includes web, neighboring exam sheets, etc.)
Violating this rule will force an immediate zero grade on the exam. You are
allowed to use calculators (including on-screen calculators).
Attempt all questions
If you are unsure of the meaning of a question, feel free to raise your hand and ask
the instructor for clarification
Explicitly state any assumptions you make when answering a question
Good Luck
pf3
pf4
pf5

Partial preview of the text

Download Midterm Exam | Introduction to Operating Systems | CS 1550 and more Exams Computer Science in PDF only on Docsity!

CS 1550 Fall 2005/6 (06-1) Mid-Term Examination

Wednesday 11

th

October 2006

Name: E-Mail: ___________________@pitt.edu

  • The expected duration of this exam is one hour and ten minutes (class duration).
  • This exam is closed-everything (this includes web, neighboring exam sheets, etc.) Violating this rule will force an immediate zero grade on the exam. You are allowed to use calculators (including on-screen calculators).
  • Attempt all questions
  • If you are unsure of the meaning of a question, feel free to raise your hand and ask the instructor for clarification
  • Explicitly state any assumptions you make when answering a question
  • Good Luck

Question 1 (5 points): Briefly describe a major advantage and disadvantage of the following OS architectures: a) Monolithic and Layered b) Virtual Machine Question 2 (4 points): Why could a microkernel OS be considered “slow”? Question 3 (4 points): Why was it important to be able to run multiple programs ( i.e. , multiprogramming) important and very desirable in the early days of computing. Question 4 (5 points): What is Belady’s anomaly? What class of page replacement algorithms do not encounter this problem?

Question 7 (4 points): Implement a binary semaphore using an atomic test-and-clear instruction tcl(x). Give the pseudocode for both P(s) and V(s). Question 8 (8 points) : A system provides a “rip ()” system call to read in the contents of an audio CD into a memory buffer. The system also provides a “burn_image()” system call to burn a CD image from a memory buffer onto a blank CD. Using any clear pseudocode, show how you would: a) Make sure that any number of processes/threads can rip a CD image, but that none can do so while a CD image is being burned. There is only one CD burner available in the system. Make sure your solution doesn’t cause race conditions or deadlocks. (6 points) b) Given your solution, which of the four conditions of deadlock have you addressed? (2 points)

Question 9 (10 points): A system has 640MB of RAM. If we have 5 active processes, 64 - bit addresses, and 128-bit page table entries, how much space is used by page tables in this system. a) using 8KB pages b) using 2KB pages c) using 8KB pages, and a two-level page table with 8-bit first-level index. [ This requires an assumption about memory usage per process, assume three pages per process, two in low addresses and a third in the high address range. Also, assume that the first and second-level table entries are the same size ]. d) an inverted page table (again, simply assume 128-bit PTEs, and 8KB pages)

Question Possible Grade 1 5 2 4 3 4 4 5 5 10 6 4 7 4 8 8 9 10 10 8 11 4 12 4 70