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

Can I install chrome os on my laptop?

555


i want information about real time operating systems because i have an interview tomoorow in valeo company.

2931


What are compile time Errors?

620


Which is your favorite editor, shell, programming shell and why?

2086


Can I close my computer while updating?

579






How do you find out computer specs?

522


Difference Between Jfs & Jfs2?

619


How do you reset your computer?

560


How do you crash a computer?

533


Why is it called gnu?

557


The flushing policy is described in the subsection on process migration strategies: a) From the perspective of the source, which other strategy does flushing resembles? b) From the perspective of the target, which other strategy does flushing resemble?

1822


How do I run wget?

534


Can you have concurrency but not parallelism?

562


Explain about memory management in operating system.

616


Where do I find disk cleanup?

550