摘要 |
The invention relates to a method of operating a computer system supporting multiple processes, and the intention is to avoid deadlock (an example of which is where process A owns resource A, and is waiting on resource B, but resource B is currently owned by process B, which is waiting on resource A). The method commences with receipt of a request from a first process for access to a resource of said computer system. If the requested resource is currently unavailable because it is currently owned by another process, the system examines which processes own or are waiting for other resources on the system, in order to try to detect whether adding the first process to a queue for the requested resource would cause a deadlock situation to arise. If so, the system will typically throw an exception, or possibly return an error to the request for the resource.
|