Counting Semaphore - Operating Systems and System Programming - Exams, Exams of Operating Systems

Main points of this exam paper are: Counting Semaphore, Notes Examination, Major Components, Modern Operating, Deadlock, External Fragmentation, Pure Segmentation, External Fragmentation, Processor Scheduling, Numerical Order

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
CS162 Spring 2003 Midterm Exam March 13, 2003
Page 1/10
University of California
College of Engineering
Computer Science Division- EECS
Spring 2003
Anthony D. Joseph
Midterm Exam
March 13, 2003
CS162 Operating Systems
Your Name:
SID AND 162 Login:
TA:
Discussion Section:
General Information:
This is a closed book and notes examination. You have two hours to answer as many questions as
possible. The number in parentheses at the beginning of each question i ndicates 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 28
2 21
3 12
4 27
5 12
Total 100
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Counting Semaphore - Operating Systems and System Programming - Exams and more Exams Operating Systems in PDF only on Docsity!

University of California College of Engineering Computer Science Division- EECS Spring 2003 Anthony D. Joseph Midterm Exam March 13, 2003 CS162 Operating Systems

Your Name:

SID AND 162 Login:

TA:

Discussion Section:

General Information: This is a closed book and notes^ examination. You have two hours 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 28 2 21 3 12 4 27 5 12 Total 100

  1. (28 points total) Short answer questions: a. (9 points) List any THREE major components of most modern operating systems (e.g., Unix, Solaris, WindowsNT, Windows2000, or WindowsXP) and briefly describe their role of each.

i)

ii)

iii)

b. (9 points) Give a definition of a counting semaphore, and list and describe the valid operations.

c. (4 points) List the conditions for deadlock.

  1. (21 points total) Processor Scheduling. Here is a table of processes and their associated running times. All of the processes arrive in numerical order at time 0. Process ID CPU Running Time Process 1 6 Process 2 1 Process 3 2 Process 4 4 Process 5 3 a. (9 points) Show the scheduling order for these processes under First-In-First-Out (FIFO), Shortest-Job First (SIF), and Round-Robin (RR) scheduling with a timeslice quantum = 1 time unit. Time FIFO SJF RR 0 1 2 3 4 5 6 7 8 9

b. (12 points) For each process in each schedule above, indicate the queue wait time and turnaround time (TRT). Scheduler Process 1 Process 2 Process 3 Process 4 Process 5 FIFO queue wait FIFO TRT SJF queue wait SJF TRT RR queue wait RR TRT The queue wait time is the total time a thread spends in the wait queue.

  1. (12 points total) Two-level Virtual Memory. For each of the following two-level virtual memory addressing schemes, explain, in one or two sentences how the scheme works. a. Virtual address format: Paging Level 1 Paging Level 2 Offset

b. Virtual address format: Paging Level 1 Segment Level 2 Offset

c. Virtual address format: Segment Level 1 Paging Level 2 Offset

d. Virtual address format: Segment Level 1 Segment Level 2 Offset

d. (4 points) List the fields of a Page Table Entry (PTE).

e. (6 points) How much physical memory is needed for a process with one page of virtual memory?

f. (2 points) What happens in the virtual memory subsystem on a context switch?

The Overwhelming Might of the US Military

The flowing is the transcript of an actual radio conversation that took place in October 1995, off the coast pf England. The British Ministry of Defense recently released the transcript:

British: Calling unknown radar constant at position *****, please divert your course 150 to the south to avoid a collision.

Americans: Recommend you divert your course 150 to the north to avoid a collision.

British: Negative. Yu will have to divert your course 150 to avoid a collision.

Americans: This is the Captain of a US Navy ship. I say again, divert your course north.

British: Negative, I say again. You will have to divert your course.

Americans: This is the captain of the aircraft carrier USS Lincoln, the second largest ship in the United States’ Atlantic Fleet. Wee are accompanied by numerous support vessels. I demand that you change your course 150 north. That’s 150 north, or countermeasures will be undertaken to ensure the safety of this ship.

British: This is a lighthouse. Your move …

We can only assume that the US ships adjusted their course south.

b. (2 points) In your barrierReached method, which conditional statement (i.e., if, or while) did you use and why?