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

OS Questions Bank UNIT2

The document is a question bank for the Operating System course at Babu Banarasi Das Northern India Institute of Technology for the academic year 2024-25. It includes various questions related to semaphores, process synchronization, and critical section problems, along with their respective Bloom's Taxonomy levels. The document is intended for second-year students and outlines key concepts and problem-solving scenarios in operating systems.

Uploaded by

anurudh2110
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)
58 views2 pages

OS Questions Bank UNIT2

The document is a question bank for the Operating System course at Babu Banarasi Das Northern India Institute of Technology for the academic year 2024-25. It includes various questions related to semaphores, process synchronization, and critical section problems, along with their respective Bloom's Taxonomy levels. The document is intended for second-year students and outlines key concepts and problem-solving scenarios in operating systems.

Uploaded by

anurudh2110
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

Department of Computer Science & Engineering

BABU BANARASI DAS


NORTHERN INDIA INSTITUTE OF TECHNOLOGY
Affiliated to Dr. A.P.J. Abdul Kalam Technical University (AKTU Code : 056)
AKTU Code: 056 Approved by All India Council for Technical Education (AICTE) Sector II, Dr
Akhilesh Das Nagar, Faizabad Road, Lucknow (UP) – India, 226028 Website :
www.bbdniit.ac.in
CSE SECOND YEAR/FOURTH SEMESTER / 2024-25
Questions Bank
1. Name of Subject: Operating System
2. AKTU Subject Code: BCS 401
3. NBA Subject Code : C 212
4. Unit : II

Q# Question Description CO BTL

Write the use of semaphore? And also explain how semaphore works?
1 2 K1
A counting semaphore S is initialized to 10. Then, 6 P operations and 4 V
2 operations are performed on S. What is the final value of S? 2 K3

Give two process synchronization solutions to meet critical section requirements. 2 K3


3
4 Give solution for synchronization of cooperative n-process of Bakery algorithm. 2 K3

5 Explain the readers/writers problem. And give a solution to solve problem. 2 K3

6 Differentiate between looping and blocking? 2 K2


Suppose we want to synchronize two concurrent processes P and Q using binary
semaphores S1 and S2. The code for the processes P and Q is shown below-

Process P Process Q
while(1) while(1)
{ {
P(S1); P(S1);
7 2 K3
P(S2); P(S2);
Critical Section Critical Section
V(S1); V(S1);
V(S2); V(S2);
} }
This ensures-
1. 1. Mutual Exclusion 2. Deadlock 3. Starvation but not deadlock
8 Draw the process state diagram and explain each state. 2 K1
A shared variable x, initialized to zero, is operated on by four concurrent processes
W, X, Y, Z as follows. Each of the processes W and X reads x from memory,
increments by one, stores it to memory and then terminates. Each of the processes
Y and Z reads x from memory, decrements by two, stores it to memory, and then
9 2 K3
terminates. Each process before reading x invokes the P operation (i.e. wait) on a
counting semaphore S and invokes the V operation (i.e. signal) on the semaphore S
after storing x to memory. Semaphore S is initialized to two. What is the
maximum possible value of x after all processes complete execution?
Consider the methods used by processes P1 and P2 for accessing their critical
sections whenever needed, as given below. The initial values of shared Boolean
variables S1 and S2 are randomly assigned.
Method used by P1 Method used by P2
while (S1 == S2); while (S1 != S2);
Critical Section Critical Section

10 S1 = S2; S2 = !S1; 2 K3

Which one of the following statements describes the properties achieved?

1. 1. Mutual exclusion but not progress 3. Progress but not mutual exclusion
2.Neither mutual exclusion nor progress 4. Both mutual exclusion and progress

CO: Course Outcome BTL: Bloom's Taxonomy Level MM: Max Marks

Name of Faculty:
Waseem Ahmad

BBDNIIT 2024-25(Even Semester)

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