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 for Introduction to Operating System | CS 333, Exams of Operating Systems

Material Type: Exam; Professor: Karavanic; Class: INTRO TO OPERATING SYSTEMS; Subject: Computer Science; University: Portland State University; Term: Unknown 2005;

Typology: Exams

Pre 2010

Uploaded on 08/16/2009

koofers-user-em5
koofers-user-em5 🇺🇸

10 documents

1 / 7

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS333 Section 002 (Karavanic)
Introduction to Operating Systems
Midterm Exam
Name: ________________________________________________
pf3
pf4
pf5

Partial preview of the text

Download Midterm Exam for Introduction to Operating System | CS 333 and more Exams Operating Systems in PDF only on Docsity!

CS333 Section 002 (Karavanic)

Introduction to Operating Systems

Midterm Exam

Name: ________________________________________________

NOTE: There are 10 questions worth 10 points each.

  1. Classify each of the following applications as batch-oriented or interactive: (a) word processing (b) generating monthly bank statements (c) computing pi (Π) to a million decimal places (d) a flight simulator
  2. What is the principal advantage of multiprogramming?
  3. What is the principle disadvantage of too much multiprogramming?
  1. For each of the following scheduling algorithms, state whether it is pre-emptive or non-pre-emptive: a. first come first served b. shortest job first c. round robin Process Arrival Time Service Time A 0.000 3 B 1.001 6 C 4.001 4 D 6.001 2
  2. For each process (A-D) listed in the above Table, draw a Gantt chart illustrating their execution using the specified scheduling algorithm: a. first-come, first-served b. shortest job first c. round robin (quantum = 2)
  1. Assume we correctly compile the program listed below, and execute it on a Solaris (UNIX) workstation. One of the lines below is shown in boldface. How many times will this line be executed? Answer: __________
  1. The Gender Dilemma Hunter High School in New York City was for many years a school for gifted girls. In the 1970s, Hunter was forced by a Court order to admit boys for the first time, becoming a co-ed school for gifted girls and boys. There was no money for building renovations (New York City had almost no money at the time) and THERE WAS ONLY ONE STUDENT BATHROOM. Your task is to help the school, which must guarantee that the following rules are followed:
    1. If a girl is in the bathroom, other girls may enter, but no boys
    2. If a boy is in the bathroom, other boys may enter, but no girls
    3. If the bathroom is empty, either a boy or a girl may enter, but not both. A sign is nailed to the door, with a sliding arrow. At any given time, it points to either Empty, Girls Present, or Boys Present. (a) Write a code sketch for two processes, Boy and Girl, that follows the given rules and guarantees that a boy and girl are never in the bathroom at the same time using semaphores. (b) Does your solution in (a) favor girls or boys? Explain.