Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

VALLEY VIEW UNIVERSITY

ALLCAMPUSES

END SANDWICH EXAMINATION: SESSION 1 2020/2021

COSC255 OPERATING SYSTEMS

LECTURER: PRINCE YAW OWUSU AMOAKO & KOFI ADU-MANU SARPONG

TIME LIMIT: 12 hours TOTAL MARKS OBTAINABLE: 120

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.

COSC255 [SESSION I @2020/2021] Page 1


Question 1:
A. Given the following characteristics for a magnetic tape using linear recording:
Density = 1600 bpi
Speed = 1500 inches/second
Size = 2400 feet
Start/stop time = 4 ms
Number of records to be stored = 200,000 records
Size of each record = 160 bytes
Block size = 10 logical records
IBG = 0.5 inch
Find the following:
i. Number of blocks needed
ii. Size of the block in bytes
iii. Time required to read one block
iv. Time required to write all of the blocks
v. Amount of tape used for data only, in inches
vi. Total amount of tape used (data + IBGs), in inches
[10 points]

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]

E. Differentiate between multithreading and multiprogramming. [3 points]

COSC255 [SESSION I @2020/2021] Page 2


Question 2

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.

i. Rewrite the expression. [4 points]


ii. Tabulate the execution of the expression. [6 points]

C. Provide a diagram that illustrates the various thread state and one that illustrate the Thread
Control Block (TCB). [5 points]

COSC255 [SESSION I @2020/2021] Page 3


Question 3
A. Assume you have a file of 10 records (identified as A, B, C, . . . J) to be stored on a disk
that holds 10 records per track. Once the file is stored, the records will be accessed
sequentially: A, B, C, . . . J. It takes 1 ms to transfer each record from the disk to main
memory. It takes 2 ms to process each record once it has been transferred into memory
and the next record is not accessed until the current one has been processed. It takes 10
ms for the disk to complete one rotation.
Suppose you store the records in the order given: A, B, C, . . . J. Compute how long it
will take to process all 10 records. Break up your computation into (1) the time to
transfer a record, (2) the time to process a record, and (3) the time to access the next
record.
[2 points]
B.
i. Provide 3 advantages and 3 disadvantages of Virtual memory management. [6 points]
ii. Given that main memory is composed of two page frames for public use and that a
seven-page program (with pages A,B, C, D) requests pages in the following order:
A, B, A, C, A, B, D, B, A, C, D

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]

COSC255 [SESSION I @2020/2021] Page 4


Question 4

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]

COSC255 [SESSION I @2020/2021] Page 5

You might also like