Deadlock prevention scheme - Operating System

Q.  Which of the following statements is not valid for deadlock prevention scheme?
- Published on 26 Aug 15

a. Number the resources uniquely and never request a lower numbered resource than the last one requested.
b. Request and all required resources be allocated before execution.
c. Release all resources before requesting a new resource.
d. Never request a resource after releasing any resource.

ANSWER: Never request a resource after releasing any resource.
 

    Discussion

  • Nirja Shah   -Posted on 21 Nov 15
    - There are four deadlock prevention conditions:

    - Mutual exclusion condition means that no process will have exclusive access to a resource.

    - The hold and wait or resource holding conditions may be removed by requiring the processes to request all the resources they will need before starting up (or before embarking upon a particular set of operations).

    - The no preemption condition is difficult or impossible to avoid as a process has to be able to have a resource for a certain amount of time, or the processing outcome may be inconsistent or thrashing may occur.

    - Circular wait condition avoids the circular waits include disabling interrupts during critical sections and using a hierarchy to determine a partial ordering of resources.

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)