0% found this document useful (0 votes)
5 views2 pages

CS3009

This document outlines the mid-semester examination for the Operating Systems course at the National Institute of Technology Rourkela for the Autumn session of 2023-2024. It includes various questions covering key concepts such as process states, scheduling algorithms, race conditions, and synchronization. The exam consists of multiple parts requiring explanations, computations, and examples related to operating systems.

Uploaded by

srk712906
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

CS3009

This document outlines the mid-semester examination for the Operating Systems course at the National Institute of Technology Rourkela for the Autumn session of 2023-2024. It includes various questions covering key concepts such as process states, scheduling algorithms, race conditions, and synchronization. The exam consists of multiple parts requiring explanations, computations, and examples related to operating systems.

Uploaded by

srk712906
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

NATIONAL INSTITUTE OF TECHNOLOGY ROURKELA

MID SEMESTER EXAMINATION, 2023


SESSION: 2023 – 2024 (Autumn)

Subject code: CS3009 Subject Name: Operating Systems Dept. Code: CS


No. of pages: 2 Full Marks: 30 Duration: 2 Hrs

Note: Answer all Questions. Questions can be answered in any serial order. However,
ensure that all parts of a question are answered sequentially.

1. (a) What are the primary and secondary goals of an OS? Explain with reasoning. [2]

(b) Differentiate between Zombie and Orphan Process. [2]

(c) Differentiate between Distributed and Network Operating Systems with diagrams. Which one
among these is called a tightly coupled system. [2]

(d) List the different Process States in OS. How many states a process must pass through in its life-
cycle to complete? Where do these states reside in memory? [2]

(e) Differentiate between Long-term scheduler and Short-term scheduler. What is the job of a
Dispatcher? [2]

2. (a) What is Cascaded Termination? In which condition does it occur? [2]

(b) Consider three processes, all arriving at time zero, with total execution time of 10, 20 and 30 units,
respectively. Each process spends the first 20% of execution time doing I/O, the next 70% of time doing
computation, and the last 10% of time doing I/O again. The operating system uses a shortest remaining
compute time first scheduling algorithm and schedules a new process either when the running process
gets blocked on I/O or when the running process finishes its compute burst. Assume that all I/O
operations can be overlapped as much as possible. Compute the percentage of time the CPU remain
idle. [4]

(c) The following program consists of 3 concurrent processes and 3 binary semaphores. The semaphores
are initialized as S0 = 1, S1 = 0, S2 = 0. [4]

Process P0 Process P1 Process P2


while (true){ wait (S1); wait (S2);
wait (S0); signal (S0); signal (S0);
print (0);
signal (S1);
signal (S2);
}

How many minimum and maximum times will process P0 print ‘0’? Assume that the process P1 and P2
run exactly once.

1
NATIONAL INSTITUTE OF TECHNOLOGY ROURKELA
MID SEMESTER EXAMINATION, 2023
SESSION: 2023 – 2024 (Autumn)

Subject code: CS3009 Subject Name: Operating Systems Dept. Code: CS


No. of pages: 2 Full Marks: 30 Duration: 2 Hrs

3. (a) What is Race Condition? Two processes, P1 and P2, need to access a critical section of code.
Consider the following synchronization construct used by the processes: [5]
Process P1 Process P2
while (true) { while (true) {
wants1 = true; wants2 = true;
while (wants2 == true); while (wants1==true);
/* Critical Section */ /* Critical Section */
wants1=false; wants2 = false;
} }
The initial values of shared boolean variables wants1 and wants2 are randomly assigned. Examine and
explain the feasibility of the solution w.r.t all the required criteria. Also, explain if the deadlock is
possible while processes try to access the critical section of the code.
(b) Consider the set of five processes whose arrival time and burst time are given below: [3]

Process Arrival Time Burst Time


P1 0 5
P2 1 3
P3 2 1
P4 3 2
P5 4 3
The CPU scheduling policy is Round Robin (RR) with Time Quantum as 2 Units. Calculate the average
waiting time and average turnaround time. Also, show the queue maintained for process arrival.

(c) Explain the convoy effect with an example. [2]

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy