Daffodil International University
Department of Computer Science and Engineering
Faculty of Science & Information Technology
Final Exam Examination, Fall 2020 @ DIU Blended Learning Center Course Code: CSE323 (Day), Course Title: Operating System
Level: 3 Term: 2 Section: PC-B Instructor: MSZ Modality: Open Book Exam Date: Sunday 20 December, 2020 Time: 02:00-06:00pm
Four hours (4:00) to support online open/case study based assessment Marks: 40 Directions:
Students need to go through the CASE STUDY shown in this exam paper.
Analyze and answer specific section based on your own thinking and work.
Do not share as this will be treated as plagiarism by Blended Learning Center.
1. There are 7 processes (P1, P2, P3, P4, P5, P6, and P7) and 5 resources (R1, R2, R3, R4, and R5).
a. Calculate the need matrix for the following graph. 2 b. Is the following scenario in the safe state? Explain it by deadlock avoidance algorithm. 2 c. Draw the wait for graph for the above resource allocation graph. 2 d. There are many approaches for handling deadlock. In your opinion which approach is the best
and which approach is the worst? Why? 4
2. a. Consider the following page references:
5, 6, 4, 5, 7, 9, 2, 4, 3, 7, 4, 6, 4, 9, 4, 6, 7, 8, 3, 5, 2, 1, 3, 4, 6, 2, 4, 3 Assuming demand paging with four frames and the frames are given below:
Apply FIFO, LRU, and Optimal Page Replacement algorithms, which algorithm should show the best performance? And Why? 7 b. Among these algorithms mentioned in 2(a), which algorithm may face Belady’s anomaly? For the above question, is there any possibility of occurring Belady’s anomaly? (Consider any three consecutive cases) 3
3. a. Consider nine processes P1, P2, P3, P4, P5, P6, P7, P8, and P9 (in order). The size of the processes are 130MB, 70MB, 35MB, 200MB, 17KB, 230MB, 25MB, 180MB, and 450 MB, respectively. The turn arounds of the processes are 2, 4, 2, 3, 1, 3, 2, 1, and 3, respectively. Given memory partitions of 200MB, 80000KB, 5MB, 500MB, 300MB, and 270MB (in order). How would Best Fit, First Fit, and Worst Fit will place each of the processes P1 to P9 in the memory partitions? 7 b. According to your opinion, for the given scenario of 3(a) which algorithm is best for allocating
this processes into memory in terms of External Fragmentation? 3
4. Suppose that a disk drive has 4,500 cylinders, numbered 0 to 4,499. The drive is currently serving a request at cylinder 2,100, and the previous request was at cylinder 2,319. The queue of pending requests, in FIFO order, is:
500, 3150, 100, 2880, 3980, 70, 1212, 2310, 4236, 3956, 350, 2100, 1800, 2900, 10
Starting from the current head position, what is the total distance (in cylinders) that the disk arm moves to satisfy all the pending requests for SSTF, SCAN, C-SCAN and C-LOOK disk scheduling algorithms. Compare among them and find the best algorithm in terms of minimum seek distance for the given scenario. 10