VUSuperior Chat Room

Wednesday, 25 February 2015

CS604 - Operating Systems Graded Discussion Board (GDB) No.1 Solution And Discussion Due Date: 27th Feb, 2015

CS604 - Operating Systems Graded Discussion Board (GDB) No.1 Solution And Discussion Due Date: 27th Feb, 2015
Graded Discussion Board

Opening Date:  26th Feb, 2015
Closing Date:   27th Feb, 2015

Dear Students,


Graded Discussion Board of CS 604 is announced now, and its due date is 26th Feb, 2015 to 27th Feb, 2015, be ready for that.

Topic is: "
Is it possible to have a deadlock condition with a single process?  Explain and justify your answer with reference to deadlock prevention method".



Regards

1 comments:

  1. Solution: No, it is not possible to have a deadlock condition in a single process.The deadlock involves a circular “hold-and-wait” condition between two or more processes, so “one” process cannot hold a resource, yet be waiting for another resource that it is holding. In addition, deadlock is not possible between two threads in a process, because it is the process that holds resources, not the thread that is, each thread has access to the resources held by the process.
    There are four conditions that are necessary to achieve deadlock:
    Mutual Exclusion – At least one resource must be held in a non-sharable mode; If any other process requests this resource, then that process must wait for the resource to be released.
    Hold and Wait – A process must be simultaneously holding at least one resource and waiting for at least one resource that is currently being held by some other process.
    No preemption – Once a process is holding a resource ( i.e. once its request has been granted ), then that resource cannot be taken away from that process until the process voluntarily releases it.
    Circular Wait – A set of processes { P0, P1, P2, . . ., PN } must exist such that every P[ i ] is waiting for P[ ( i + 1 ) % ( N + 1 ) ]. ( Note that this condition implies the hold-and-wait condition, but it is easier to deal with the conditions if the four are considered separately. )

    ReplyDelete