You are on page 1of 3

FINAL EXAM IN OPERATING SYSTEM (CS204)

1. **The content of a file is scattered in a disk through link allocation


technique. Make an assumption and draw how these 10 link pages
connected. Based on the link, how many time a disk will revolve to access
the whole file using Shortest Seek Time First Algorithm.
2. In process management what are the reasons why a process needs to go
to Waiting state. Draw the architecture and discuss how “fork a child be
terminated” in relation to data structure?
3. Draw the 5 stages of a process and discuss major concepts that you
learned in the course. For example, ready state CPU utilization and CPU
scheduling discussion.
4. Apply an MFU and LFU algorithm to simulate the performance of the page
replacement algorithm. Describe each advantages and disadvantages of
these page replacement algorithms.
5. Assume that you are playing a video game (What memory allocation is
the most suitable?) and a memory is subdivided into 200, 300, 500, 700
and 1,000. Respectively. Illustrate fragmentation and perform
compaction. (You may assume 5 process to be loaded in memory chunk).
6. Given a 12 bits to be used in creating a multiple link allocation technique.
Show the architecture following 2, 2, 3 bits for pages and 5 bits for
frames, how many frames is controlled by each pages in the table. Draw
your architecture. “
7. Using page replacement algorithm with initial 15 pages {1, 4, 3, 1, 2, 4, 3,
5, 6, 1, 3, 4, 4, 3, 5}, Check the presence of Belady’s Anomaly if the frame
start at 3, 4 and 5.
8. Answer the following: (10 marks)

a. What is the problem of FCFS in CPU scheduling?


b. What is the problem of memory contiguous allocation?
c. What is the solution of Priority scheduling algorithm?
d. What is the solution of FCFS problem in CPU scheduling?
e. What is the solution of busy swapping of data in and out in memory
and CPU?
f. What is the solution of the problem for best fit, first fit and worst fit
algorithm?
g. Which memory allocation is used for games and videos?
h. It generates logical address or pages?
i. It generates physical address or frames?
j. Give one algorithm that reads the disk in the CDROM?

9. **Assume that CPU scheduling runs in a multiple processor environment


as depicted in the diagram below. Compute the average waiting time and
average turn-around time of the following processor with the following
table: (10 marks)

10.**In disk scheduling mechanism, the head just finished 12 and now
currently serving 23 and need to service 2, 50, 20, 78, 90, 15 and 80
sector. The sector range is 0-100.

a. How many turnaround can be produced by FCFS, SSTF, Elevator, C-


SCAN and C-LOOK algorithm.
b. Which of the algorithm you will use to scan or read your files?

11.**Apply the Banker’s Algorithm in DEADLOCK mechanism with the


following table: (10 marks)

a. How many instances of A, B, C, and D?


b. What is the safety sequence to avoid deadlock?
c. Will request P4(0,1,1,0) be granted or not?

You might also like