In: Computer Science
Answer the following questions about computer operating systems:
1.
Which of the following conditions must exist for deadlock to occur?
Group of answer choices
All of these.
No preemption
Circular wait
Hold and wait
Mutual exclusion
2.
Which of the following is not a method for dealing with deadlock?
Group of answer choices
deadlock prevention
deadlock deletion
deadlock detection and recovery
deadlock avoidance
3.
A state where deadlock might occur is known as a(n) ________________.
Group of answer choices
safe state
dead state
unsafe state
critical state
4.
A resource allocation graph can indicate if deadlock might occur if there is a _______________ in the graph.
Group of answer choices
bear
cycle
detached subgraph
petri net
(1) All of these.
It is the situation in which set of processes get blocked as each of the process holds resource & waits for the other resource held by other process. Given all the optons are conditions for it to occur.
Mutual Exclusion - More then one of resources are non-shareable i.e only 1 process is able to use t particular time.
Hold and wait - One process hold the resource & waits for other resource.
NO-preemption - If one process acquires the resource it cannot ba taken from it.
Circular wait - In a circular way processes wait for the other one.
(2) Deadlock deletion is the answer for it.
For dealing with deadlock there exists
Deadlock avoidance or prevention - This way avoid the system for letting it go in the deadlock.
Deadlock detection and recovery - After deadlock occurs, preemption is done for handling after it occurs.
Ignoring problem altogether - When deadlock occurs & it appears to be rare, it is allowed to happen then system is re-booted.
(3) Answer of this is unsafe state
In a safe state the system is able to allocate the resources that processess request.
In unsafe state the system is not able to fulfill the request made by the processes, which gives possibility to deadlock.
In critical state, shared resources are accesible.
In dead state process is terminated or stoppes.
(4) Answer to this is cycle.
Resource allocation graph pictorially represents a system's state. If one process waits for the other and this flow enters a cyclic one then it causes deadlock. Gien other options are not in context with deadlock.