👁️ 318 views
University of Barishal Logo

University of Barishal

Department of Computer Science and Engineering

Final Exam

Course Title: Operating System (CSE-2207)

Semester: 4th | Session: 21-22

Time: 180 minutes | Marks: 60.00

Course Teacher: Md. Rashid Al Asif

Exam Date: August 4, 2025

N.B.: Answer any FIVE questions out of the following. All parts of each question must be answered consecutively. Right side of the question shows the maximum marks.

1.


a) Discuss the relationship between hardware, OS, system programs, and application programs.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
2 Marks
b) What are the main components in the logical organization of a computer system?

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
3 Marks
c)

How does the distinction between kernel mode and user mode function as a rudimentary form of protection (security) system?

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
3 Marks
d)

Imagine a busy office where employees rely on computers for tasks like writing reports, sending emails, and managing databases. An employee, Maya, arrives at work and turns on her computer.
However, this time, there's no Operating System installed- just the raw hardware.

i) What challenges did Maya face when using a computer without an Operating System?
ii) What role does the OS play in providing access to applications and files?

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
2.


a)

Define a process. What are the various states a process can be in during its lifecycle?

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
b)

What is a Process Control Block (PCB)? Illustrate and explain its components with a diagram.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
c)

Consider the following set of processes, with the length of the CPU burst given in milliseconds:

The processes are assumed to have arrived in order P1, P2, P3, P4, P5 all at time 0.

i) Draw four Gantt charts that illustrate the execution of these processes using the following scheduling algorithms: preemptive priority (a large priority number implies a higher priority) and RR (quantum = 5)
ii) What is the turnaround time of each process for each of the scheduling algorithms
iii) What is the waiting time of each process for each of these scheduling algorithms?
iv) Which of the algorithms results in the minimum average waiting time (over all processes)?

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
3.


a)

What is deadlock? Discuss various strategies used to prevent it from occurring.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
b)

Illustrate how a Resource Allocation Graph (RAG) can be utilized to identify deadlocks in a system.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
5 Marks
c)

Define a thread. How does it differ from a process in terms of resource management and execution?

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
3 Marks
4.


a) What is process synchronization, and why is it necessary in a multiprogramming environment? Provide examples of problems caused by lack of synchronization.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
b)

Describe how semaphores are used for process synchronization. Illustrate with an example of the producer-consumer problem.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
5 Marks
c)

How does thread scheduling differ from process scheduling? Explain with example.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
3 Marks
5.


a)

In a university's computer lab, two students, Alice and Bob, are writing parallel programs that require access to two shared printers (Printer A and Printer B). Each printer is treated as a non-shareable resource. The following situation occurs:

  • Alice acquires Printer A and requests Printer B.
  • Bob acquires Printer B and requests Printer A.
  • Neither student can proceed because each is waiting for a resource held by the other, and the system does not preempt resources.

i) Identify and explain the four necessary conditions for deadlock. Which of these are satisfied in the above scenario?


ii) Draw a Resource Allocation Graph (RAG) to represent the above scenario. Based on your graph, explain how a cycle implies a deadlock.


iii) Describe how a deadlock detection and recovery approach would handle this situation.


iv) Modify the system such that it uses the Banker's Algorithm. Would the system have entered a deadlock in that case? Explain using a safe unsafe state analysis.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
12 Marks
6.


a)

Compare first-fit, best-fit, and worst-fit memory allocation strategies in terms of their impact on fragmentation.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
3 Marks
b)

Consider a system with 1000 KB of memory and processes that require varying sizes of memory blocks. Simulate memory allocation and identify points where fragmentation occurs. How can it be minimized?

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
3 Marks
c)

Define internal and external fragmentation with necessary diagrams.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
2 Marks
d)

Explain how paging and segmentation deal with the problem of fragmentation. Which type of fragmentation do they each address?

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
7.


a)

What is segmentation? Consider the following segment table:

What are the physical addresses for the following logical addresses?

i) 0,430   ii) 1,10
iii) 2,500   iv) 3,400

 

 

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
b)

Describe the sequence of steps that occur when a virtual address is translated using TLB. What happens in the case of a TLB hit and a TLB miss?

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
5 Marks
c)

 Define page fault. What are the actions taken by the operating system when a page fault occurs, and how is this related to the TLB and page table?

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
3 Marks
8.


a)

Describe optimal page replacement algorithm for the following reference string 7 0 1 4 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1. Also calculate the number of page fault for frame size 4.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
5 Marks
b)

Define following terms: i) CPU Thrashing   ii) RAID

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
c)

Explain different types of CPU schedulers.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
3 Marks

Contributors of this Question:

Role Name Date
Prepared By (Teacher): Md. Rashid Al Asif Aug. 4, 2025
Uploaded By: Margia Rowshon Aug. 4, 2025, 2:50 p.m.
Converted By (Img/PDF to Text): Baishakhi Bir Dec. 3, 2025, 5:31 p.m.
Reviewed By: Obaydul Hasan Nayeem Dec. 3, 2025, 6:36 p.m.