Current Affairs PDF

Gem Points For IBPS SO (Specialist Officer) – Part -14 (Deadlock)

AffairsCloud YouTube Channel - Click Here

AffairsCloud APP Click Here

Hello Aspirants,as we all know only few days are left for IBPS SO exam.So, we are starting a new series ” Gem points ” in this regard.learn them by heart.Share and discuss in comment section.We will gear up level day by day starting from very basics.So,Put your Seatbelts on and join us in the journey to be a specialist officer.

Deadlocks

1)A deadlock is a situation in which two or more competing actions are each waiting for the other to finish, and thus neither ever does.

2)The reusable resource is that can be used by one process at a time and is not depleted by that use.

3)Conditions required for deadlock to be possible :-
*mutual exclusion
*a process may hold allocated resources while awaiting assignment of other resources
*no resource can be forcibly removed from a process holding it.

4) A system is in the safe state if
~the system can allocate resources to each process in some order and still avoid a deadlock
~there exist a safe sequence.

5)The circular wait condition can be prevented by defining a linear ordering of resource types.

6)banker’s algorithm is the deadlock avoidance algorithm.

7)Drawbacks of banker’s algorithm :-
~ in advance processes rarely know that how much resource they will need
~ the number of processes changes as time progresses
~ resource once available can disappear

8)For effective operating system, when to check for deadlock :-
a) every time a resource request is made
b) at fixed time intervals

9) A problem encountered in multitasking when a process is perpetually denied necessary resources is called starvation.

10)resource allocation graph is a visual ( mathematical ) way to determine the deadlock occurrence.

11) To avoid deadlock, there must be a fixed number of resources to allocate.

Deadlock Prevention

1)The number of resources requested by a process : must not exceed the total number of resources available in the system.

2)The request and release of resources are system calls.

3)Multithreaded programs are :more prone to deadlocks.Multiple threads can compete for shared resources.

4)For a deadlock to arise, which of the following conditions must hold simultaneously
Mutual exclusion
Hold and wait
No pre-emption
Circular wait

5) For Mutual exclusion to prevail in the system :at least one resource must be held in a non sharable mode.
If another process requests that resource (non – shareable resource), the requesting process must be delayed until the resource has been released.

6)For a Hold and wait condition to prevail :A process must be holding at least one resource and waiting to acquire additional resources that are being held by other processes.

7)Deadlock prevention is a set of methods :to ensure that at least one of the necessary conditions cannot hold.

8)For non sharable resources like a printer, mutual exclusion :must exist.
A printer cannot be simultaneously shared by several processes.

9)For sharable resources, mutual exclusion : is not required.
They do not require mutually exclusive access, and hence cannot be involved in a deadlock.

10)To ensure that the hold and wait condition never occurs in the system, it must be ensured that :
a) whenever a resource is requested by a process, it is not holding any other resources
b) each process must request and be allocated all its resources before it begins its execution
c) a process can request resources only when it has none

Explanation: c – A process may request some resources and use them. Before it can can request any additional resources, however it must release all the resources that it is currently allocated.

11)The disadvantage of a process being allocated all its resources before beginning its execution is : Low resource utilization.

12)To ensure no preemption, if a process is holding some resources and requests another resource that cannot be immediately allocated to it :then all resources currently being held are pre-empted.

13)One way to ensure that the circular wait condition never holds is to :impose a total ordering of all resource types and to determine whether one precedes another in the ordering.

IN NEXT PARTS
Deadlock Avoidance
Deadlock Detection
Deadlock Recovery