Method and system for providing a group of parallel resources as a proxy for a single shared resource
First Claim
1. A method in a computer system for emulating the sharing of a resource between a first program and a second program running on an operating system that cannot allocate the resource so that it is accessible by every program executing in conjunction with the operating system, the method being performed under the control of the operating system, the method comprising:
- (a) intercepting a transfer message directed by the first program to the second program as an attempt by the first program to share an original resource being used by the first program with the second program, the transfer message having a reference to the original resource;
(b) creating a duplicate resource being a separate copy of the original resource and accessible to the second program;
(c) substituting the reference to the original resource in the transfer message with a reference to the duplicate resource;
(d) storing the references to the original resource and duplicate resource; and
(e) forwarding the transfer message with the reference to the created duplicate resource to the second program so that the second program can access the provided duplicate resource to emulate the sharing of the original resource with the second program.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and system for providing a group of parallel resources as a proxy for a single shared resource is provided. In a preferred embodiment, a resource grouping facility (“the facility”) is incorporated in a “non-global” operating system. A non-global operating system is an operating system that is unable to respond correctly to a request to allocate a global resource of a particular type, such as a memory block, that can be accessed by every program executing in conjunction with the operating system. Instead, a non-global operating system allocates a putatively global resource that may not be accessed by every program executing in conjunction with the non-global operating system. When the facility detects that a transferer program is attempting to share a putatively global resource allocated by the operating system with a transferee program, the facility allocates a proxy resource that is accessible to the transferee. The facility may also allocate one or more intermediate resources accessible to other programs. The facility tracks the putatively global resource and all of the proxy resources as a proxy group. In a preferred embodiment, the facility also copies characteristics of the putatively global resource to the proxy resources. For example, where the putatively global resource and the proxy resources are memory blocks, the facility preferably copies the contents of the putatively global memory block to the proxy memory blocks. When the facility detects that a program is attempting to deallocate a member of the proxy group, that is, a putatively global resource or one of its proxies, the facility preferably deallocates each member of the proxy group.
-
Citations
14 Claims
-
1. A method in a computer system for emulating the sharing of a resource between a first program and a second program running on an operating system that cannot allocate the resource so that it is accessible by every program executing in conjunction with the operating system, the method being performed under the control of the operating system, the method comprising:
-
(a) intercepting a transfer message directed by the first program to the second program as an attempt by the first program to share an original resource being used by the first program with the second program, the transfer message having a reference to the original resource;
(b) creating a duplicate resource being a separate copy of the original resource and accessible to the second program;
(c) substituting the reference to the original resource in the transfer message with a reference to the duplicate resource;
(d) storing the references to the original resource and duplicate resource; and
(e) forwarding the transfer message with the reference to the created duplicate resource to the second program so that the second program can access the provided duplicate resource to emulate the sharing of the original resource with the second program. - View Dependent Claims (2, 3, 4, 5, 6, 11, 12)
(f) in response to an attempt by either the first program to delete the original resource or the second program to delete the duplicate resource, referencing the stored references to the duplicate resource and the original resource and deleting both the duplicate resource and the original resource.
-
-
3. The method of claim 2 wherein both resources may be subject to deletion only at certain times, wherein act (f) includes:
-
(g) deleting any of the resources that are presently subject to deletion; and
(h) when each of the resources not deleted in act (g) becomes subject to deletion, deleting the resource.
-
-
4. The method of claim 1, wherein the original resource and the duplicate resource are first and second memory blocks, respectively, and wherein the step of creating the duplicate resource includes copying the contents of the first memory block into the second memory block.
-
5. The method of claim 2 wherein the step of creating a duplicate resource includes:
-
allocating an intermediate resource;
copying the contents of the original resource to the intermediate resource;
allocating a duplicate resource; and
copying the contents of the intermediate resource to the duplicate resource.
-
-
6. The method of claim 5 wherein the step of storing includes storing a reference to the intermediate resource along with the references to the original and duplicate resources, and the step of deleting includes deleting the intermediate resource.
-
11. The method of claim 1, wherein the original resource has a state, the method further comprising:
-
detecting an operation performed on the original resource by the first program to alter the state of the original resource; and
in response to detecting the performance of the operation on the original resource, performing the detected operation on the duplicate resource.
-
-
12. The method of claim 1, wherein the duplicate resource has a state, the method further comprising:
-
detecting an operation performed on the duplicate resource by the second program to alter the state of the duplicate resource; and
in response to detecting the performance of the operation on the duplicate resource, performing the detected operation on the original resource.
-
-
7. A computer-readable medium having computer-readable instructions for performing steps to emulate the sharing of a resource between a first program and a second program running on an operating system that cannot allocate the resource so that it is accessible by every program executing in conjunction with the operating system, the steps comprising:
-
(a) intercepting a transfer message directed by the first program to the second program as an attempt by the first program to share an original resource being used by the first program with the second program, the transfer message having a reference to the original resource;
(b) creating a duplicate resource being a separate copy of the original resource and accessible to the second program;
(c) substituting the reference to the original resource in the transfer message with a reference to the duplicate resource;
(d) storing the references to the original resource and duplicate resource in a substitution list; and
(e) directing the transfer message with the reference to the created duplicate resource to the second program so that the second program can access the provided duplicate resource to emulate the sharing of the original resource with the second program. - View Dependent Claims (8, 9, 10, 13, 14)
(f) in response to an attempt by either the first program to delete the original resource or the second program to delete the duplicate resource, referencing the stored references to the duplicate resource and the original resource and deleting both the duplicate resource and the original resource.
-
-
9. The computer-readable medium of claim 7 wherein the original resource and duplicate resource are first and second memory blocks, respectively, and wherein the step of creating the duplicate resource includes the step of copying the contents of the first memory block into the second memory block.
-
10. The computer-readable medium of claim 7 wherein the step of creating a duplicate resource includes:
-
allocating an intermediate resource;
copying the contents of the original resource to the immediate resource;
allocating a duplicate resource;
copying the contents of the intermediate resource to the duplicate resource.
-
-
13. The computer-readable medium of claim 7, wherein the original resource has a state, and wherein the contents of the computer medium includes further computer-executable instructions to perform the steps of:
-
detecting an operation performed on the original resource by the first program to alter the state of the original resource; and
in response to detecting the performance of the operation on the original resource, performing the detected operation on the duplicate resource.
-
-
14. The computer-readable medium of claim 7, wherein the duplicate resource has a state, and wherein the contents of the computer medium includes further computer-executable instructions to perform the steps of:
-
detecting an operation performed on the duplicate resource by the second program to alter the state of the duplicate resource; and
in response to detecting the performance of the operation on the duplicate resource, performing the detected operation on the original resource.
-
Specification