Operating Systems
CSE · Final · Spring 25
Batch 63
Read the questions as text
Read off the PDF by AI, so it may have mistakes. The PDF is the original.
Daffodil International University
Faculty of Science & Information Technology
Department of Computer Science & Engineering
Final Semester Examination, Spring 2025
Course Code: CSE 323, Course Title: Operating Systems
Level: 3 Term: 1 Batch: 63
Time: 2:00 Hrs
Marks: 40
Answer ALL Questions
[The figures in the right margin indicate the full marks and corresponding course outcomes. All portions of each question must be answered sequentially.]
1. a) A university library has M study rooms and N students (N > M) who need a room for studying. Each student waits for an available room and must release it after finishing study. If all rooms are occupied, some students must wait (starvation possibility). If every student checks a room at the same time, a race condition may occur.
Outline a semaphore-based solution to manage study room access. | [5] | CO2
b) A cloud provider CloudX offers CPU cores (C), Virtual Memory (M), and Storage (S) to different clients running machine learning workloads.
The total available resources are: C=12, M=8, S=10
The Maximum Need and Allocated Resource Table are given below:
Client | Max (C, M, S) | Allocation (C, M, S)
A | 7 4 3 | 2 2 2
B | 8 3 6 | 3 1 3
C | 3 3 2 | 2 1 1
D | 5 2 4 | 1 1 2
I. Identify whether the system is in a safe state or not. If so, then provide the safe sequence.
II. If Client A requests additional resources (6, 1, 2), identify whether it can be granted immediately or not. | [5] | CO3
2. a) The following data is observed for multiprogramming system with a set of 20 processes:
Allocation Method | Fragmentation (%) | Turnaround (ms)
Contiguous | External (22%) | 240
Paging | Internal (20%) | 210
Segmentation | External (10%) | 200
Based on the above data, analyze the trade-offs between contiguous and non contiguous memory allocation methods in terms of systems performance. | [5] | CO3
b) The following jobs are loaded into memory following a certain memory allocation method:
Job | Size(k) | Turnaround | Block | Size(k)
Job 1 | 50 | 2 | Block 1 | 45
Job 2 | 20 | 1 | Block 2 | 100
Job 3 | 40 | 3 | Block 3 | 80
Job 4 | 10 | 1 | Block 4 | 60
Job 5 | 30 | 2 | Block 5 | 40
Job 6 | 60 | 2 | |
Job 7 | 35 | 3 | |
Job 8 | 80 | 3 | |
Job 9 | 90 | 1 | |
Job 10 | 25 | 2 | |
Apply Best Fit Memory allocation method in order to fit all the processes in memory. At each cycle 5 Jobs can be allocated. | [5] |
3. a) Given a system with 3 frames of physical memory and the following page reference string:
P1, P2, P3, P6, P1, P3, P4, P5, P6, P1, P2, P3, P4, P5, P7, P2, P8
Apply Optimal Page Replacement Algorithm and determine the page fault rate. | [5] | CO3
b) Compare between FIFO, LRU and Optimal Page Replacement Algorithm. | [5] |
4. a) Consider the following disk request sequence for a disk with 90 tracks (12, 34, 52, 14, 25, 68, 39). R/W head is starting at 53.
Identify the total number of head movements using SSTF, C-SCAN and LOOK scheduling. | [5] | CO3
b) Consider a system using a magnetic disk with the following characteristics:
i. Disk rotational speed: 7200 RPM (Revolutions Per Minute).
ii. Seek time: 1 ms (milliseconds).
iii. Average seek time: 8 ms (milliseconds).
iv. Disk transfer rate: 100 MB/s (Megabytes per second).
v. Number of sectors per track: 200.
vi. Head Position: Track 20
vii. Sector size: 512 bytes.
A process accessing a sector at track 50 on the disk. Identify the total time required to read these sectors, including seek time, rotational latency, and data transfer time. | [5] |