Method for managing shared resources
First Claim
1. A method for managing shared resources in a parallel computer system in which a plurality of computers having programs are connected to a coupling facility, comprising the steps of:
- storing a use state data object in said coupling facility indicating whether a resource shared among said computers is being used or not, and storing a use queue;
issuing a reservation request to one of said shared resources by one of said programs on said computers before using said one shared resource and reserving said shared resource for said one program with said coupling facility if said shared resource is unused;
adding said one program to the use queue for said one shared resource if said shared resource is being used by another of said programs;
reserving the right to use said shared resource for a next one of said programs in the use queue for said shared resource when said another program using said one shared resource frees said one shared resource; and
notifying said next program that said one shared resource is reserved for said next program.
1 Assignment
0 Petitions
Accused Products
Abstract
An enqueue structure type is provided within a coupling facility to record the use state and to manage a request queue of resources shared among programs on computers of a system. All programs to use a shared resource issue a request to reserve the shared resource to the coupling facility before using it. The coupling facility affords the permission to use the resource to the programs if it is usable, and adds the programs to the resource request queue if unusable. When a program using the shared resource frees it, the coupling facility fetches a program from the beginning of the request queue, reserves the shared resource for the next program and notifies the next program that the use of the shared resource has been approved. On receiving the notification, the program uses the shared resource without asking the coupling facility for the approval of the use of the shared resource again. Further, exclusive control of shared resources by use of a spin lock having shared and exclusive attributes is implemented by using two locks for one shared resource, wherein the first lock is reserved and then freed after the second lock is reserved.
-
Citations
20 Claims
-
1. A method for managing shared resources in a parallel computer system in which a plurality of computers having programs are connected to a coupling facility, comprising the steps of:
-
storing a use state data object in said coupling facility indicating whether a resource shared among said computers is being used or not, and storing a use queue; issuing a reservation request to one of said shared resources by one of said programs on said computers before using said one shared resource and reserving said shared resource for said one program with said coupling facility if said shared resource is unused; adding said one program to the use queue for said one shared resource if said shared resource is being used by another of said programs; reserving the right to use said shared resource for a next one of said programs in the use queue for said shared resource when said another program using said one shared resource frees said one shared resource; and notifying said next program that said one shared resource is reserved for said next program. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A system for managing shared resources in a parallel computer system in which a plurality of computers having programs are connected to a coupling facility, comprising:
said coupling facility having a use state data object indicating whether a resource shared among said computers is being used or not, and a use queue, wherein, when one of said programs on said computers issues a reservation request to one of said shared resources before using the shared resource, said coupling facility, if said shared resource is unused, reserves said shared resource for said program, and if said shared resource is being used by another of said programs, adds said one program to the end of the use queue for said shared resource, and wherein, when said another program using said shared resource frees said shared resource, the coupling facility reserves the right to use said shared resource for a next one of said programs in the use queue for said one shared resource and notifies said next program that said one shared resource is reserved for said next program. - View Dependent Claims (7, 8, 9, 10, 11)
-
12. A coupling facility for managing shared resources in a parallel computer system including a plurality of computers connected together through channels, the computers having programs, comprising:
-
an instruction processor and memory, wherein said memory stores a data structure including a shared resource queue for each resource, wherein, when one of the programs requests a shared resource, if said shared resource is unused, said shared resource is reserved for said program, and if said shared resource is being used by another of said programs, said one program is added to an end of the use queue for said shared resource, and wherein, when said another program using said shared resource frees said shared resource, the coupling facility transfers the right to use the shared resource to a next one of the programs in the use queue for said shared resource and notifies the next program that the shared resource is free. - View Dependent Claims (13, 14, 15)
-
-
16. A parallel computer system having computers connected to a coupling facility via intersystem channels each including instruction processing units, memory, input-output processors, and channels, wherein:
said coupling facility receives a message command block (MCB) sent via the intersystem channels from the computers and executes a predetermined command according to operands specified in the MCB, including a command creating a message response block MRB that is sent back to the computer that sent the MCB, and wherein the coupling facility executes a command to report acceptance of a reservation request for a shared resource requested by a program to a specific computer by sending the MRB via the intersystem channel and further wherein a data structure is created when a program that requests reservation of a shared resource that is being used by another of said programs to put the reservation request in a use queue chronologically, so that the shared resource is reserved for a next program in said use queue when said another program frees said shared resource. - View Dependent Claims (17, 18)
-
19. A method for managing shared resources by use of spin locks used in resource exclusion processing in a computer system in which a plurality of processors operate in parallel, comprising the steps of:
-
reserving exclusive and shared use of said shared resources with first and second locks corresponding to said shared resources; reserving said first lock of one said resource for exclusive use by a first one of said programs of said one resource and reserving said second lock of said one resource if none of said programs is using said one resource and lock wait spinning for said second lock if another of said programs is using said one resource until said another program subsequently frees said second lock for said one resource, and freeing said first lock for said one resource when said second lock for said one resource is successfully reserved by said first program; and reserving said first lock of one said resource for shared use of said one resource by a second one of said programs and reserving said second lock of said one resource if none of said programs is using said one resource or if any of said programs is just in shared use of said one resource followed by freeing said first lock for said one resource when said second lock for said one resource has been reserved by said second program.
-
-
20. A system for managing shared resources by use of spin locks used in resource exclusion processing in a computer environment in which a plurality of processes operate in parallel, comprising:
-
first and second locks provided for one shared resource for resource management; means for exclusively reserving a resource that exclusively reserves a first lock corresponding to said resource and exclusively reserves a second lock corresponding to said resource, and frees said first lock; means for reserving said resource with a shared attribute that reserves the first lock corresponding to said resource with a shared attribute, reserves the second lock corresponding to said resource with a shared attribute, and frees the first lock; and means, after reserving the second lock, for respectively reserving exclusive or shared access to said resource, and if access to said resource becomes unnecessary, frees the second lock regardless of the exclusive or shared access.
-
Specification