DB Deadlocks
Multiple Choice questions & answers are available for a Computer Science students to clear GAT, NTS, ECAT exams, various technical interview, competitive examination, and other entrance exam. Deadlocks is the important Topic for a computer science and technical students and one should practice these Mcqs to grasp good knowledge on the topic.
2. A set of processes is deadlock if
Each process is blocked and will remain so forever
Each process is terminated
All processes are trying to kill each other
None of the mentioned
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
3. To avoid the race condition, the number of processes that may be simultaneously inside their critical section is
8
1
16
4. With a single resource, deadlock occurs
If there are more than two processes competing for that resource
If there are only two processes competing for that resource
If there is a single process competing for that resource
None of these
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
5. 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
Deadlocked state is unsafe
Unsafe state may lead to a deadlock situation
Deadlocked state is a subset of unsafe state
All of these
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
6. The methods for dealing with the deadlock problem is
Use a protocol to make sure that the system never enters in to the deadlock state.
Allow the system to enter a deadlock state and then recover.
Ignore the problem, and pretend that deadlocks never occur in the system. The UNIX operating system uses this solution.
All of these
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
7. A system has 3 processes sharing 4 resources. If each process needs a maximum of 2 units, then
Deadlock can never occur
Deadlock may occur
Deadlock has to occur
None of these
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
8. A process said to be in ___________ state if it was waiting for an event that will never occur.
Safe
Unsafe
Starvation
Dead lock
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
9. In one of the deadlock prevention methods, impose a total ordering of all resource types, and require that each process requests resources in an increasing order of enumeration. This violates the _______________ condition of deadlock.
Mutual exclusion
Hold and Wait
Circular Wait
No Preemption
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
10. Resource locking ________.
Allows multiple tasks to simultaneously use resourc
Forces only one task to use any resource at any time
Can easily cause a dead lock condition
Is not used for disk drives
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
11. Situations where two or more processes are reading or writing some shared data and the final results depends on the order of usage of the shared data, are called ________.
Race conditions
Critical section
Mutual exclusion
Dead locks
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
12. When two or more processes attempt to access the same resource a _________ occurs.
Critical section
Fight
Communication problem
Race condition
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
13. A process is starved
If it is permanently waiting for a resource
If semaphores are not used
if a queue is not used for scheduling
If demand paging is not properly implemented
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
14. Let S and Q be two semaphores initialized to 1, where P0 and P1 processes the following statements wait(S);wait(Q); —; signal(S);signal(Q) and wait(Q); wait(S);—;signal(Q);signal(S); respectively. The above situation depicts a _________ .
Semaphore
Deadlock
Signal
Interrupt
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
15. The state of a process after it encounters an I/O instruction is __________.
Ready
Blocked/Waiting
Idle
Running
Answer & Solution
No Solution for this Answer..! Report or Discus this Question