Protecting shared resources using mutex striping
First Claim
1. In a computing system, computer-readable code embodied on one or more computer-readable media readable by said system for improving shared access to resources, comprising:
- a subprocess for grouping a plurality of sharable resources into a plurality of resource sets, each of said sharable resources being a member of only one of said resource sets;
a subprocess for associating each of a plurality of semaphores with one or more of said resource sets, at least one of said semaphores being concurrently associated with more than one of said resource sets, wherein a number of said resource sets to be concurrently associated with each semaphore is determined by evaluating an expression (K modulo N) wherein “
K”
represents a count of said resource sets and “
N”
represents a count of said semaphores and wherein N is less than K; and
a subprocess for locking a selected sharable resource, said selected sharable resource being one of said members of a selected resource set, using a selected semaphore associated with said selected resource set, thereby also locking all of said sharable resources which are grouped into all of said one or more resource sets associated with said selected semaphore.
1 Assignment
0 Petitions
Accused Products
Abstract
A technique, system, and computer program for improving access to shared resources in a computing system. The shared resources are grouped into application-defined resource sets. Mutual exclusion semaphores are used. A semaphore is associated with each resource set to provide mutually-exclusive (serialized) access to the resources in the set. The number of semaphores will be smaller (typically, much smaller) than the number of resource sets, so that a given semaphore will be associated with multiple of such sets. Thus, the set of semaphores is striped across the collection of resource sets. This greatly increases allowable parallelism in accessing shared resources, while reducing the number of semaphores that are required.
-
Citations
12 Claims
-
1. In a computing system, computer-readable code embodied on one or more computer-readable media readable by said system for improving shared access to resources, comprising:
-
a subprocess for grouping a plurality of sharable resources into a plurality of resource sets, each of said sharable resources being a member of only one of said resource sets;
a subprocess for associating each of a plurality of semaphores with one or more of said resource sets, at least one of said semaphores being concurrently associated with more than one of said resource sets, wherein a number of said resource sets to be concurrently associated with each semaphore is determined by evaluating an expression (K modulo N) wherein “
K”
represents a count of said resource sets and “
N”
represents a count of said semaphores and wherein N is less than K; and
a subprocess for locking a selected sharable resource, said selected sharable resource being one of said members of a selected resource set, using a selected semaphore associated with said selected resource set, thereby also locking all of said sharable resources which are grouped into all of said one or more resource sets associated with said selected semaphore. - View Dependent Claims (2, 3, 4)
-
-
5. A system for improving shared access to resources in a computing system, comprising:
-
a plurality of sharable resources;
a plurality of semaphores;
means for grouping said sharable resources into a plurality of resource sets, each of said sharable resources being a member of only one of said resource sets;
means for associating each of said plurality of semaphores with one or more of said resource sets, at least one of said semaphores being concurrently associated with more than one of said resource sets, wherein a number of said resource sets to be concurrently associated with each semaphore is determined by evaluating an expression (K modulo N) wherein “
K”
represents a count of said resource sets and “
N”
represents a count of said semaphores and wherein N is less than K; and
means for locking a selected sharable resource, said selected sharable resource being one of said members of a selected resource set, using a selected semaphore associated with said selected resource set, thereby also locking all of said sharable resources which are grouped into all of said one or more resource sets associated with said selected semaphore. - View Dependent Claims (6, 7, 8)
-
-
9. A method for improving access to shared resources in a computing system, comprising the steps of:
-
grouping a plurality of sharable resources into a plurality of resource sets, each of said sharable resources being a member of only one of said resource sets;
associating a plurality of semaphores with one or more of said resource sets, at least one of said semaphores being concurrently associated with more than one of said resource sets, wherein a number of said resource sets to be concurrently associated with each semaphore is determined by evaluating an expression (K modulo N) wherein “
K”
represents a count of said resource sets and “
N”
represents a count of said semaphores and wherein N is less than K; and
locking a selected sharable resource, said selected sharable resource being one of said members of a selected resource set, using a selected semaphore associated with said selected resource set, thereby also locking all of said sharable resources which are grouped into all of said one or more resource sets associated with said selected semaphore. - View Dependent Claims (10, 11, 12)
-
Specification