Operating System and System Programming
SWE · Final · Fall 25
Read the questions as text
Read off the PDF by AI, so it may have mistakes. The PDF is the original.
Daffodil International University
Department of Software Engineering
Faculty of Science & Information Technology
Final Examination, Fall 2025
Course Code: SE232; Course Title: Operating System & System Program
Sections & Teachers: 42 (A,B,C)IS, FJT(D,E,K), SBM(F,G), RBG(H,I), PS(J)
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) Imagine an online store that has only one copy of a popular item left in its inventory. Two customers, working through two separate processes, attempt to purchase that final item at nearly the same moment. Each process checks the database and sees that one copy is available. Because they are running independently, both decide the item can be purchased and each subtracts one from the stock. They then update the database one after the other, both writing the value zero. The system ends up confirming two successful purchases even though only one item existed
Demonstrate the reasoning of this problem and the solution to avoid this situation.
Marks [6]
CLO-2
Level-3
b) Apply a memory management scheme that faces internal fragmentation but improves the performance by allowing non-contiguous allocation.
Marks [4]
CLO-3
Level-4
2 a) in a system with three processes P1, P2 and P5, and two resources A and B, where A has two instances and B has three instances, P1 is currently holding one instance of A and requests one instance of B; P2 is holding two instances of B and requests one instance of A; and P3 is holding one instance of A and requests one instance of B.
Identify if there is a deadlock or not in the system through RAG and proper reasoning.
Marks [5]
b) There are overall 10 units of A, 8 units of B and 5 units of C in your system. The system is currently in safe state. Consider the following independent request for additional resources in the current state.
Process | Allocation A | Allocation B | Allocation C | Maximum Need A | Maximum Need B | Maximum Need C
P1 | 2 | 1 | 0 | 8 | 6 | 3
P2 | 1 | 2 | 2 | 9 | 4 | 3
P3 | 0 | 2 | 0 | 5 | 3 | 3
P4 | 3 | 0 | 1 | 4 | 2 | 3
Analyze if a request from process P4 arrives for (1, 1, 1) can the request be granted immediately? If it can be granted then find out the safe sequence.
Marks [5]
c) Consider memory partitions of size 400 KB, 550 KB, 450 KB, 300 KB, 310 KB, and 250 KB. These partitions need to be allocated to five processes of sizes 444 KB, 210 KB, 500 KB, 344 KB, and 123 KB in that order.
Illustrate the Static contiguous memory allocation of processes using
I. First Fit Algorithm
II. Best Fit Algorithm
III. Worst Fit Algorithm
and identify the internal and external fragmentation for each block.
Marks [5]
3 a) Suppose your virtual memory consists of six (1-6) pages, where pages 2, 4, 5, 6 are missing in the physical memory. In addition the memory has only 3 frames to allocate the pages.
Explain the solution in detail when the four pages won't be found in the main memory and also the limited frame number while bringing the missing pages into memory.
Marks [6]
CLO-4
Level-5
b) Consider the system has three frames available and the page request string as {2,3,4,5, 0,1,1,3,5,2,4,0,2,0,3,5,1,4,4,2,1,2,3,4,5}
Compare the page fault and hit ratio by Optimal page replacement algorithm.
Marks [5]
c) Evaluate the disk scheduling criteria through the C-Elevator algorithm for the given scenario: Where the initial requests move towards the larger value.
Request sequence = {70, 45, 155, 15, 249, 222, 52, 101, 99, 9, 199, 79}
Disk range (3-250)
Initial head position = 55;
Marks [4]