Operating System - Question
Operating System - Question
ALLCAMPUSES
INSTRUCTIONS TO STUDENT
There are four (4) questions in all. You are to answer any three (3) questions.
Do not spend too much time initially on any one item. If you are not sure of an answer,
go on to the next item and come back to it later.
Before turning in the exam, make sure you have completed all answered questions of the
exam and have entered completely and correctly indicated your full name and student
identification number.
B. Strategies for handling deadlocks include prevention. Prevention eliminates one of four
conditions. Analyze these conditions. [10 points]
C. Briefly explain the following virtual memory schemes, Paged, Demand Paged,
Segmented, Segmented/Demand Paging. Using a Table, Differentiate among them in
terms of the following categories, Problem Solved, Problem Created, Changes in
Software. [10 points]
D.
i. Explain how Cache Memory is utilized with respect to the two levels that typical
microprocessor has. [3 points]
ii. Given total number of requests is 10, and 6 of those are found in cache memory find
the hit ratio. [2 points]
iii. Using the answer obtained from (ii) above, given that the average cache access time is
200 nanoseconds (nsec) and the average main memory access time is 1000 nsec, find
the average memory access time. [2 points]
A. Given that it takes 1.75 ms to travel from one track to the next of a hard drive; that the arm is
originally positioned at Track 15 moving toward the low- numbered tracks; and that you are
using the LOOK scheduling policy:
Compute the total seek time to satisfy the following requests—4, 40, 35, 11, 14, and 7. Assume
all requests are initially present in the wait queue. (Ignore rotational time and transfer time;
just consider seek time.)
[10 points]
B. Most programming languages are serial in nature—instructions are executed one at a time.
Therefore, to resolve an arithmetic expression, every operation is done in sequence following
the order prescribed by the programmer and compiler. Table below shows the steps to
compute the following expression:
A = 3 * B * C + 4 / (D + E) ** (F – G)
Making use of a language that allows concurrent processing and making use of the terms —
COBEGIN and COEND— that will indicate to the compiler which instructions can be processed
concurrently.
C. Provide a diagram that illustrates the various thread state and one that illustrate the Thread
Control Block (TCB). [5 points]
a. Using the FIFO page removal algorithm, do a page trace analysis indicating page
faults with asterisks (*). Then compute the failure rate. [2 points]
b. Using the LRU page removal algorithm, do a page trace analysis indicating page
faults with asterisks (*). Then compute the failure rate. [2 points]
C.
i. What is the difference between deadlock and starvation? [2 points]
ii. Describe how the system identifies starved task. [2 points]
iii. Using the case of the dining philosophers problem introduced by Dijkstra in 1968
illustrate starvation. [6 points]
D.
i. In Paged Memory allocation the Memory Manager keeps track pages by using three
tables. Name and describe these tables. [6 points]
ii. Given a page size of 256 bytes. Find the location of byte 384 by indicating the page
number and line number. [2 points]
E. There are two types of scheduling policies, preemptive and nonpremptive. What are
their characteristics? [2 points]
A. Using your own computer, give the name of the operating system that runs it and give
examples of five legal file names. Then give examples of five illegal file names, attempt
to use them on your system to save a file, and describe what error message you received.
Finally, explain how you could fix the filename so it would work on your system.
[10 points]
B. Using a diagram explain the various transition a job goes through from one job or
process status to another. [10 points]
C. Briefly explain five (5) good process scheduling policy criteria that are needful to be
considered. [10 points]
D. Using the figure below, state and explain the various conditions for deadlock. Use these
conditions to verify if the vehicles are in a deadlock. [10 points]