0% found this document useful (0 votes)
19 views

OS Unit 2

Uploaded by

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

OS Unit 2

Uploaded by

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

SRM INSTITUTE OF SCIENCE AND TECHNOLOGY

RAMAPURAM CAMPUS
COLLEGE OF ENGINEERING AND TECHNOLOGY
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

QUESTION BANK

Sub Code/Name 21CSC202J /OPERATING SYSTEMS


UNIT 2
PART A (1 mark)

Mark C
Q.No. MCQ Questions BL PI
s O

Which process can be affected by other processes


executing in the system?
a) cooperating process
1 b) child process 1 2 1 1.2.2
c) parent process
d) init process

Answer : a

Peterson solution is restricted to ----------- process that


alternate execution between their critical section and
remainder sections.

a)one
2 1 2 2 2.8.4
b) two
c) three
d) four

Answer : b

When several processes access the same data


concurrently and the outcome of the execution depends
on the particular order in which the access takes place, is
called?
a) dynamic condition
3 b) race condition 1 2 1 4.4.3
c) essential condition
d) critical condition

Answer : b

4 Mutex is short for ------ 1 2 1 2.7.1


a)Mutual Excluded
b) mutually explained
c) mutual exclusion
d) mutual exception

Answer : c

Which one of the following is a synchronization tool?


a) thread
b) pipe
5 c) semaphore 1 2 1 4.4.3
d) socket

Answer : c

If a process is executing in its critical section, then no


other processes can be executing in their critical section.
This condition is called?
a) mutual exclusion
b) critical exclusion
6 c) synchronous exclusion 1 2 1 4.4.3
d) asynchronous exclusion

Answer : a

A semaphore is a shared integer variable __________


a) that can not drop below zero
b) that can not be more than zero
7 c) that can not drop below one 1 2 2 2.1.2
d) that can not be more than one

Answer : a

8 Mutual exclusion can be provided by the __________ 1 2 1 2.1.2


a) mutex locks
b) binary semaphores
c) both mutex locks and binary semaphores
d) binary lock

Answer : c
When high priority task is indirectly preempted by
medium priority task effectively inverting the relative
priority of the two tasks, the scenario is called
__________
a) priority inversion
9 b) priority removal 1 2 2 1.2.2
c) priority exchange
d) priority modification

Answer : a

Process synchronization can be done on __________


a) hardware level
b) software level
c) both hardware and software level
10 d) Process Level 1 2 2 2.8.4

Answer : c

Semaphore is a/an _______ to solve the critical section


problem.
a) hardware for a system
b) special program for a system
11 c) integer variable 1 2 1 1.2.2
d) Software for a system

Answer : c

The wait operation of the semaphore basically works on


the basic _______ system call.
a) stop()
b) block()
12 c) hold() 1 2 1 1.2.2
d) wait()

Answer : b

13 The signal operation of the semaphore basically works on 1 2 1 1.2.2


the basic _______ system call
a) continue()
b) wakeup()
c) getup()
d) start()

Answer : b

What are the two kinds of semaphores?


a) mutex & counting
b) binary & counting
c) counting & decimal
14 d) decimal & binary 1 2 1 1.2.2

Answer : b

At a particular time of computation the value of a


counting semaphore is 7.Then 20 P operations and 15 V
operations were completed on this semaphore. The
resulting value of the semaphore is?

a) 42
15 b) 2 1 2 1 2.8.4
c) 7
d) 12

Answer : b

A binary semaphore is a semaphore with integer values


____________
a) 1
b) -1
16 c) 0.8 1 2 1 2.1.2
d) 0.5

Answer : a

17 The bounded buffer problem is also known as 1 2 2 1.2.2


____________
a) Readers – Writers problem
b) Dining – Philosophers problem
c) Producer – Consumer problem

d) Critical Section Problem


Answer : c

To ensure difficulties do not arise in the readers – writers


problem _______ are given exclusive access to the
shared object.
a) readers
b) writers
18 c) readers and writers 1 2 2 1.6.1
d) either reader or writers

Answer : b

In the bounded buffer problem, there are the empty and


full semaphores that ____________
a) count the number of empty and full buffers
b) count the number of empty and full memory
spaces
19 c) count the number of empty and full queues 1 2 2 1.2.2
d) count the number of empty and full process

Answer : a

Message passing system allows processes to __________

(a) communicate with one another without resorting to shared data

(b) communicate with one another by resorting to shared data

20 (c) share data 1 2 1 1.6.1

(d) name the recipient or sender of the message

Answer a.

21 1 2 1 1.2.2
Which of the following two operations are provided by the IPC facility?

(a) Write & delete message

(b) Delete & receive message

(c) Send & delete a message


(d) Receive & send message

Answer D.

A situation where several processes access and


manipulate the same data concurrently and the outcome
of the execution depends on the particular order in which
access takes place is called ____________

(a) data consistency

22 (b) race condition 1 2 2 1.2.2

(c) starvation

(d) critical section

Answer B.

The segment of code in which the process may change common variables, update tables, write into

(a) program

(b) race condition


23 1 2 2 3.8.2
(c) synchronizing

(d) critical section

Answer D.

24 1 2 2 1.2.2
Concurrent access to shared data may result in ____________

(a) data consistency

(b) data insecurity

(c) data inconsistency


(d) None of the mentioned

Answer B

Counting semaphore can have _______ values.

(a) 0

(b) 1

25 (c) n 1 2 1 2.6.5

(d) -1

Answer :C

Buffer is partial empty

(a) Producer can produce

(b) Consumer can consume


26 1 2 1 1.6.1
(c) Both A and B

(d) None of above

Answer C

Multiple processes are permitted to concurrently acquire a reader–writer lock in read mode, but on

(a) reading, readers

(b) reading, writers


27 1 2 2 1.2.2
(c) writing, writers

(d) writing, readers

Answer C
__________ is a condition in which there is a set of concurrent processes, only one of which is abl

(a) Mutual Exclusion

(b) Busy Waiting


28 1 2 1 1.2.2
(c) Deadlock

(d) Starvation

Answer C.

A monitor is a type of ____________

a) semaphore

b) low level synchronization construct


29 1 2 1 4.4.3
c) high level synchronization construct

d) none of the mentioned

Answer C

A procedure dened within a ________ can access only


those variables declared locally within the

_______ and its formal parameters.

a) process, semaphore
30 1 2 2 4.4.3
b) process, monitor

c) semaphore, semaphore

d) monitor, monitor
PART B (4 marks)

Q. No. Questions Marks CO PI


BL

1. What is critical section problem? 4 2 1 2.1.2

2. Define busy waiting and spinlock. 4 2 1 1.6.1

What are the requirements that a solution to the critical


3. 4 2 2 1.2.2
section problem must satisfy?

4. Define entry section and exit section. 4 2 1 1.6.1

5. Define semaphores. 4 2 2 1.2.2

6. Name dome classic problem of synchronization? 4 2 2 1.6.1

What is the concept behind strong semaphore and


7. 4 2 3 4.4.3
spinlock?

8. Elucidate mutex locks with its procedure. 4 2 3 2.6.4

9. Can a mutex be locked more than once ? 4 2 3 2.8.4

10. What are the different synchronization mechanisms? 4 2 3 2.6.4

11. Define classical problem of synchronization. 4 2 1 1.6.1

12. Why is process synchronization required? 4 2 3 1.2.2

13. Draw & briefly explain the process states? 4 2 2 4.4.3

What is process control block? List out the data field


14. 4 2 2 4.4.3
associated with PCB.

15. What is meant by context switching? 4 2 2 2.7.1

16. List out the benefits and challenges of thread handling.  4 2 2 4.4.3

17. Define co- operating process and independent process. 4 2 1 1.2.2

18 What are the benefits of multithreaded programming? 4 2 2 4.4.3

19 . What is mean by monitors? 4 2 1 1.2.2

20 Differentiate a Thread form a Process. 4 2 1 1.2.2


PART C (12 marks)

Q. No. Questions Marks CO PI


BL

What is critical section? Specify the requirements for a


1. 12 2 2 2.1.2
solution to critical section problem.

Discuss in detail the critical section problem and also write


2. the algorithm for ReadersWriters Problem with 12 2 3 4.4.3
semaphores .

Show how wait() and signal() semaphore operations could


be implemented in multiprocessor environments using the
3. test and set instruction. The solution should exhibit 12 2 2 4.4.3
minimal busy waiting. Develop pseudo code for
implementing the operations.

Discuss about the issues to be considered in the


4. 12 2 2 2.8.4
multithreaded program.

What is Semaphore? Explain producer consumer problem


5 12 2 2 1.6.1
using semaphore?

6 Explain the solution for Dining-Philosophers Problem. 12 2 3 2.1.2

7. Explain interprocess communication in detail. 12 2 2 1.6.1

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