This section contains 948 words (approx. 4 pages at 300 words per page) |
When a resource is available to more than one process but can only be used by one of them at a time, it is necessary for a process to use a "lock" that would prevent another process from accessing the resource simultaneously. If such a resource has already been locked by another process, then it is necessary to wait until the holder of the lock has released it for another to use.
Using such locks can sometimes result in a condition called deadlock. A trivial example of this is when a process holding a lock dies, so that the lock it placed on a resource remains in place forever, thus preventing all other processes from ever accessing the resource. Another situation where deadlock can occur is if a process needs to acquire two locks on two separate resources, in order to execute an action. In this case, it...
This section contains 948 words (approx. 4 pages at 300 words per page) |