👁️ 195 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: 18-19

Time: 180 minutes | Marks: 60.00

Course Teacher: Md. Rashid Al Asif

Exam Date: September 22, 2022

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

1.


a)

We have stressed the need for an operating system to make efficient use of the computing hardware. When is it appropriate for the operating system to forsake this principle and to "waste" resources? Why is such a system not really wasteful?

Please SUBSCRIBE to view full question

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

Why do some systems store the operating system in firmware, while others store it on disk?

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
2 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) List five services provided by an operating system and explain how each creates convenience for users.

Please SUBSCRIBE to view full question

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


a)

Direct memory access is used for high-speed I/O devices in order to avoid increasing the CPU's execution load.

i) How does the CPU interface with the device to coordinate the transfer?

ii) The CPU is allowed to execute other programs while the DMA controller is transferring data. Does this process interfere with the execution of the user programs? If so, describe what forms of interference are caused.

Please SUBSCRIBE to view full question

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

What are the two essential parts of a process? How is a process different from a program?

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
3 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 the 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: FCFS, SJF, non preemptive priority (a large priority number implies a higher priority), and RR (quantum = 2)

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!
6 Marks
3.


a)

Define demand paging and segmentation with examples.

Please SUBSCRIBE to view full question

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

Draw storage device hierarchy.

Please SUBSCRIBE to view full question

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

Explain different threading models with sufficient diagrams.

Please SUBSCRIBE to view full question

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


a)

Provide two programming examples in which multithreading provides better performance than a single-threaded solution.

Please SUBSCRIBE to view full question

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

Illustrate how a binary semaphore can be used to implement mutual exclusion among n processes.

Please SUBSCRIBE to view full question

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

Race conditions are possible in many computer systems. Consider a banking system that maintains account balance with two functions: deposit (amount) and withdraw (amount). These two functions are passed the amount that is to be deposited or withdrawn from the bank account balance. Assume that a husband and wife share a bank account. Concurrently, the husband calls the withdraw() function and the wife calls deposit(). Describe how a race condition is possible and what might be done to prevent the race condition from occurring.

Please SUBSCRIBE to view full question

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

Why do some systems store the operating system in firmware, while others store it on disk?

Please SUBSCRIBE to view full question

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


a)

Consider a computer system that runs 5,000 jobs per month and has no deadlock-prevention or deadlock-avoidance scheme. Deadlocks occur about twice per month, and the operator must terminate and rerun about ten jobs per deadlock. Each job is worth about two dollars (in CPU time), and the jobs terminated tend to be about half done when they are aborted.

A systems programmer has estimated that a deadlock-avoidance algorithm (like the banker's algorithm) could be installed in the system with an increase of about 10 percent in the average execution time per job. Since the machine currently has 30 percent idle time, all 5,000 jobs per month could still be run, although turnaround time would increase by about 20 percent on average.

i) What are the arguments for installing the deadlock-avoidance algorithm?

ii) What are the arguments against installing the deadlock-avoidance algorithm?

Please SUBSCRIBE to view full question

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

Consider the following snapshot of a system where there are five processes PO through p4 and three resource types A (10 instances), B (5 instances), and C (7 instances):


Answer the following questions using the banker's algorithm:

i) What is the content of the matrix Need?

ii) Define safe and unsafe state. Is the system in a safe state? If so, show a safe order in which the processes can execute.

iii) If a request from process PO arrives for (0,2,0), can the request be granted immediately?

Please SUBSCRIBE to view full question

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

List three examples of deadlocks that are not related to a computer system environment.

Please SUBSCRIBE to view full question

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


a)

Given the following system:

-Total of four processes

-Total of three resources (one instance per resource)

-Three process has each one Request Edge to one of the Resources (you decide which one)

 

i) Draw the resource allocation graph of the System

ii) Is the system you drew in a Safe/Unsafe/Deadlocked state? Justify you answer

Please SUBSCRIBE to view full question

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

Consider a system in which a program can be separated into two parts: code and data. The CPU knows whether it wants an instruction (instruction fetch) or data (data fetch or store). Therefore, two base-limit register pairs are provided: one for instructions and one for data. The instruction base-limit register pair is automatically read-only, so programs can be shared among different users. Discuss the advantages and disadvantages of this scheme.

Please SUBSCRIBE to view full question

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

What is paging? Consider a logical address space of 64 pages of 1,024 words each, mapped onto a physical memory of 32 frames.

i) How many bits are there in the logical address?

ii) How many bits are there in the physical address?

Please SUBSCRIBE to view full question

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


a)

Given six memory partitions of 300 KB, 600 KB, 350 KB, 200 KB, 750 KB, and 125 KB (in order), how would the first-fit, best-fit, and worst-fit algorithms place processes of size 115 KB, 500 KB, 358 KB, 200 KB, and 375 KB (in order)? Rank the algorithms in terms of how efficiently they use memory.

Please SUBSCRIBE to view full question

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

What is fragmentation? Briefly explain different types of fragmentation in context to operating system.

Please SUBSCRIBE to view full question

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

What is fragmentation? 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!
5 Marks
8.


a)

Consider the following page reference string:

1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6

How many page faults would occur for the following replacement algorithms, assuming three and four frames? Remember that all frames are initially empty, so your first unique pages will cost one fault each.

  • LRU replacement
  • Optimal replacement

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
6 Marks
b) Define following terms: i) Thrashing ii) RAID

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
3 Marks
c) Explain why SSDs often use an FCFS disk-scheduling algorithm.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
3 Marks

Good Luck!!!

Contributors of this Question:

Role Name Date
Prepared By (Teacher): Md. Rashid Al Asif Sept. 22, 2022
Uploaded By: Onebyzero Edu (Test User) Aug. 17, 2024, 9:23 p.m.
Converted By (Img/PDF to Text): Baishakhi Bir Dec. 3, 2025, 9:10 p.m.
Reviewed By: Obaydul Hasan Nayeem Dec. 3, 2025, 10:29 p.m.