MCQ Questions On Deadlock And Starvation In OS Part-2

1. With .........................., requested resources are granted to processes whenever possible.
A) deadlock detection
B) deadlock deletion
C) deadlock prevention
D) deadlock avoidance

2. Which of the following are the strategies needed for  recovery once deadlock has been detected.
i) Abort all deadlocked processes
ii) Backup each deadlocked process to some previously defined checkpoint and restart all processes
iii) Successively abort deadlocked processes until deadlock no longer exists.
iv) Successively preempt resources until deadlock no longer exist.
A) i, ii and iii only
B) ii, iii and iv only
C) i, iii and iv only
D) All i, ii, iii and iv

3. ...................... strategy for dealing with deadlock is reasonable if the maximum storage requirements are known.
A) Swappable  space
B) Process resources
C) Main memory
D) Internal resources

4. It is reasonable to expect processes to declare ahead of the time the resources that they will require in ......................
A) Swappable  space
B) Process resources
C) Main memory
D) Internal resources

5. In strategies for dealing with deadlock, prevention by preemption appears to be most appropriate strategy for ...................
A) Swappable  space
B) Process resources
C) Main memory
D) Internal resources

6. Which of the following is/are the variety of mechanisms provided by UNIX for inter-processor communication and synchronization are as follows.
i) Pipes   ii) Messages   iii) Shared Memory   iv) Main Memory  v) Semaphores
A) i, ii, iii and iv only
B) i, ii, iii and v only
C) i, iii, iv and v only
D) ii, iii, iv and v only

7. Which of the following are the mechanism used by the W2K executive to implement synchronization facilities.
i) Process   ii) Threads   iii) Condition Variables   iv) Mutex   v) Semaphore
A) i, ii, iii and iv only
B) i, ii, iii and v only
C) i, ii, iv and v only
D) ii, iii, iv and v only

8. In UNIX concurrency mechanisms, pipes and messages provide a means of communicating data across processes, whereas ...................... are used to trigger actions by other processes.
A) Shared memory and signals
B) Semaphores and shared memory
C) Semaphores and signals
D) Shared memory, semaphores and signals

9. A ......................... is a circular buffer allowing two processes to communicate on the producer consumer model.
A) message
B) pipe
C) shared memory
D) signal

10. ...................... is the fastest form of inter-process communication provided in UNIX, which is a common block of virtual memory shared by multiple processes.
A) message
B) pipe
C) shared memory
D) signal

11. A reading process in blocked if it attempts to read more bytes than are currently in the .................; otherwise the read request is immediately executed.
A) message
B) pipe
C) shared memory
D) signal
 
12. A semaphore consists of which of the following elements.
i) Current value of the semaphore
ii) Process ID of the last process to operate on the semaphore
iii) Number of processes waiting for the semaphore value to be one
A) i and ii only
B) ii and iii only
C) i and iii only
D) All i, ii and iii

13. A .......................... is a software mechanism that informs a process of the occurrence of asynchronous events.
A) message
B) pipe
C) shared memory
D) signal

14. Which of the following are the thread synchronization primitives supported by solaris
i) Mutual exclusion   ii) Semaphores   iii) Signals   iv) Condition variables
A) i, ii and iii only
B) ii, iii and iv only
C) i, ii and iv only
D) All i, ii, iii and iv

15. Which of the following are the major disadvantages of deadlock avoidance.
i) Future resource requirements must be known
ii) Process can be blocked for long periods
iii) Inherent preemption losses
A) i and ii only
B) ii and iii only
C) i and iii only
D) All i, ii and iii

16. The schema used for deadlock ....................... is invoking periodically to test for deadlock.
A) prevention
B) avoidance
C) detection
D) deletion

17. While preventing deadlock with ................................. needs no run-time computation since problem is solved in system design.
A) request all resources
B) preemption
C) resource ordering
D) finding safe path

18.  ............................ is convenient when applied to resources whose state can be saved and restored easily while preventing deadlock.
A) request all resources
B) preemption
C) resource ordering
D) finding safe path

19. Which of the following are the major disadvantages of requesting all resources while preventing deadlock.
i) delays process initiation
ii) future resources requirements must be known
iii) subject to cyclic restart
A) i and ii only
B) ii and iii only
C) i and iii only
D) All i, ii and iii 

20.  In ........................... some resources, such as files, may allow multiple access for readers but only exclusive access for writers.
A) Mutual Exclusion
B) Hold and Wait
C) Preemption
D) Circular Wait


Answers

1. A) deadlock detection
2. D) All i, ii, iii and iv
3. A) Swappable  space
4. B) Process resources
5. C) Main memory
6. B) i, ii, iii and v only
7. C) i, ii, iv and v only
8. C) Semaphores and signals
9. B) pipe
10. C) shared memory
11. B) pipe
12. A) i and ii only
13. D) signal
14. C) i, ii and iv only
15. A) i and ii only
16. C) detection
17. C) resource ordering
18. B) preemption
19. A) i and ii only
20. A) Mutual Exclusion

 Read Next:MCQ Questions On Memory Management In OS Part-1

MCQ Questions On Deadlock And Starvation In OS Part-2
2017-01-21T01:27:00-08:00
Shuseel Baral
Multiple Choice Question (MCQ)|Operating System|