摘要 |
A method and apparatus coordinate creation and destruction of a shared object in a distributed system. An owner process creates the shared object and each other process in the system makes a local copy of the object. When a local process has a reference to the shared object, each other process is informed of the local reference. Only the owner process can destroy the object. When the owner process determines that there are no other processes, including itself, which have a reference to the shared object, the owner process decides to destroy the object. Prior to destroying the object, however, the owner process inquires of each other process as to whether it is permissible to destroy the object. If a process does not have a local reference to the object, the process will give the owner process permission to destroy the object. When, on the other hand, the process has a local reference to the object, the process will tell the owner process not to destroy the object. This confirmation of destruction prevents the invalid destruction of shared objects in the distributed system. |