What is deadlock? How do you avoid it?

Answer Posted / sagarika mishra

A set of processes is deadlocked if each process in the set
is waiting for an event that only another process in the
set can cause (including itself).

Waiting for an event could be:

waiting for access to a critical section
waiting for a resource Note that it is usually a non-
preemptable (resource). pre-emptable resources can be
yanked away and given to another.
deadlock avoided by:-
Resource allocation state:
# of available / allocated instances of each type
maximum demand of each process
Safe sequence: For an allocation state, a sequence
hP1; : : : ; Pni is safe if for each Pi, the maximum
resources that
Pi can request can be satised by currently available
resources
+ resources held by all Pj (j < i)
Safe state: System istb in safe state if there exists a safe
sequence consisting of all processes

Is This Answer Correct ?    18 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where do I find disk cleanup?

699


Can I restore my computer to yesterday?

730


How do I combine multiple folders on a mac?

714


How do I clean up and speed up my computer?

682


What is the first operating system in the world?

740






How much ram do I need for streaming?

724


What is the difference between wget and curl?

751


Is i3 good for gaming?

735


How do you crash a computer?

720


How To Enable & Disable Quorum?

776


What does kernel panic mean?

772


Will disk cleanup delete my files?

656


How do I merge folders on mac?

700


How many bytes we can send to apple push notification server in iOS operating system?

808


Can you just explain about memory management in iOS?

797