• Tidak ada hasil yang ditemukan

Department of Computer Science and Engineering

N/A
N/A
Protected

Academic year: 2023

Membagikan "Department of Computer Science and Engineering"

Copied!
2
0
0

Teks penuh

(1)

Daffodil International University

Department of Computer Science and Engineering

Faculty of Science & Information Technology

Final Exam Examination, Summer 2020 @ DIU Blended Learning Center Course Code: CSE323 (Day), Course Title: Operating System

Level: 3 Term: 2 Section: PC-B Instructor: SZ Modality: Open Book Exam Date: Saturday 22 August, 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. a. Given the following page numbers: 7 5,2,3,7,0,1,3,5,2,4,2,8,1,4,2,3,0,1,4,3,0,3,7,5

Assuming demand paging with four frames and the frames are given below:

In this scenario, among the FIFO, LRU and Optimal Page Replacement algorithms, which algorithm should show the best performance? And why?

b. For the above question, is there any possibility of occurring Belady’s Anomaly? (Consider any three consecutive cases) 5

2. Given memory partitions of 220K, 55K, 20K, 120K, 75K, and 35K (in order), how would Best Fit and Worst Fit algorithms place each of the processes P1 to P10 given in the table (in order). Show

the Internal and External Fragmentation for each of the rounds. 8

Process Size Turnaround

P1 50K 2

P2 20K 3

P3 35K 2

P4 110K 3

P5 90K 4

P6 200K 1

P7 5K 2

P8 55K 1

P9 170K 3

P10 86K 1

(2)

Memory Block Size

Block 1 220K

Block 2 55K

Block 3 20K

Block 4 120K

Block 5 75K

Block 6 35K

3. a. Draw the resource allocation graph for the following scenario and find out if the following system of five processes with 3 resources shows the deadlock or not? If deadlock then describe the reason and if not then show the finishing sequence of processes with proper calculations. 6

Process Allocation Need Available

R1 R2 R3 R1 R2 R3 R1 R2 R3

P1 1 1 0 0 1 0 1 1 0

P2 1 2 0 1 0 1

P3 1 0 0 0 1 0

P4 1 0 2 1 0 0

P5 0 1 1 0 1 1

b. Draw the wait-for graph for the resource allocation graph of the above problem. 2

c. Consider that, a system contains some resources R1, R2, R3, R4, R5 and R6. A unique integer number is assigned to each resource type. The unique integers assigned to R1, R2, R3, R4, R5, and R6 are 111,112,113,114,115, and 116 respectively. Assume that, the system has the following processes P1, P2, P3, P4, P5, and P6. With this information, how can you prevent deadlock from the system? 5

4. Suppose that a disk drive has 3,000 cylinders, numbered 0 to 2,999. The drive is currently serving a request at cylinder 1,600, and the previous request was at cylinder 1,710. The queue of pending requests, in FIFO order, is:

100, 2600, 500, 1150, 1800, 80, 980, 2800, 1212, 2300, 70, 1580, 350

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 and C-LOOK disk scheduling algorithms.

Compare among them and justify which one is better for minimum seek distance. 7

Referensi

Dokumen terkait

Daffodil International University Department of Computer Science and Engineering Faculty of Science & Information Technology Midterm Examination, spring 2021 @ DIU Blended Learning

Daffodil International University Department of Computer Science and Engineering Faculty of Science & Information Technology Midterm Examination, Fall 2020 @ DIU Blended Learning