Classical

Operating System - Deadlocks

1:  

With a single resource, deadlock occurs

A.

if there are more than two processes competing for that resource

B.

if there are only two processes competing for that resource

C.

if there is a single process competing for that resource

D.

none of these

 
 

Option: D

Explanation :

Deadlock doesn't occurs with a single resource


2:  

A state is safe if the system can allocate resources to each process (up to its maximum) in some order and still avoid deadlock. Then

A.

deadlocked state is unsafe

B.

unsafe state may lead to a deadlock situation

C.

deadlocked state is a subset of unsafe state

D.

all of these

 
 

Option: D

Explanation :

Safe State

  • A system is in a safe state only if there exists a safe sequence of processes P1, P2, P3, Pn where:

    • For each Pi, the resources that Pi can still request can be satisfied by the currently available resources plus the resources help by all Pj, j<i.

  • If a system is in safe state, there is no deadlock.

  • If the system is deadlocked, it is in an unsafe state.

  • If a system is in unsafe state, there is a possibility for a deadlock.

  • Avoidance: making sure the system will not enter an unsafe state.


3:  

A computer system has 6 tape drives, with 'n' processes competing for them. Each process may need 3 tape drives. The maximum value of 'n' for which the system is guaranteed to be deadlock free is

A.

4

B.

3

C.

2

D.

1

 
 

Option: C

Explanation :

Two processes can never lead to deadlock as the peak time demand of 6 (3 + 3) tape drives can be satisfied. But 3 processes can lead to a deadlock if each hold 2 drives and then demand one more.


4:  

'm' processes share 'n' resources of the same type. The maximum need of each process doesn't exceed 'n' and the sum all the their maximum needs is always less than m + n. In this set up

A.

deadlock can never occur

B.

deadlock may occur

C.

deadlock has to occur

D.

none of these

 
 

Option: A

Explanation :

Using Banker's algorithm, one can show that one process has to acquire all its needed resources. This process, after completing its task, will release all its resources, thereby avoiding any possible deadlock.


5:  

Consider a system having 'm' resources of the same type. These resources are shared by 3 processes A, B, C, which have peak time demands of 3, 4, 6 respectively. The minimum value of 'm' that ensures that deadlock will never occur is

A.

11

B.

12

C.

13

D.

14

 
 

Option: A

Explanation :

Having 11 resources ensures that atleast 1 process will have no pending request. This process after using will release the resources and so deadlock can never occur.




Suggest an improvement

 


Syllabus covered in this section is-

  • Main functions of operating systems
  • Multiprogramming, multiprocessing and multitasking
  • Memory Management- Virtual memory, paging, fragmentation
  • Concurrent Processing: Mutual exclusion, Critical regions, locks and unlock.
  • Scheduling: CPU scheduling. I/O scheduling, Resource scheduling
  • Deadlock and scheduling algorithms.
  • Banker's algorithm for deadlock handling.

This Section covers Operating System Questions Answers .These questions can be used for the preparation of various competitive and academic exams like

  • UGC NET Computer Science
  • Pre PhD Entrance Exam
  • DOEACC Exams
  • Kendriya Vidyalaya Sangathan Entrance Exam
  • Undergraduate Computer Science Examinations
  • GATE Computer Science
  • Post Graduate Computer Science Test
  •  PhD Entrance Exam
  • Computer Engineering
  • State Eligibility Test (SET)
  • National Eligibility Test (NET)

Who can benefit

  • Operating System Objective Questions Answers can be used by any student who is preparing for PhD entrance exam, pre PhD entrance exam, entrance exam or any other such exam.
  • Any student who is preparing for DOEACC exams can also use Operating System questions answers for preparation of his exams.
  • Operating System mcq can be useful for the students who are pursuing any undergraduate or post graduate degree in computer science like BE, ME , Btech, Mtech, .BSc, MSc, BCA, MCA, BS, MS  or any other such degree
  • Operating System mcq with answers and explanation can also be useful for the students who are preparing for any competitive exam or recruitment exams like GATE Computer Science, UGC NET Computer Science, Kendriya Vidyalaya Sangathan PGT exam, PSU, IES or any other such exam.
  • Operating System multiple choice questions answers  can also be used by any candidate who wants to gain credits in Operating System in BS Computer science or MS Computer science,
  • You can download Operating System mcq pdf from this site.
  • You can get access to Operating System multiple choice questions answers EBook.

Various search terms used for This section are

  • Operating System Quiz Questions With Answers

  • Operating System Exam Questions Answers

  • Operating System Mcq Questions Answers

  • Operating System Mcq Pdf Download