Software locking mechanism for locking shared resources in a data processing system
First Claim
Patent Images
1. A method of providing lock services for shared resources comprising the steps of:
- transmitting by a first processor, a read request over a bus to a first entry in a lock record data structure;
reading data from said first entry into a first buffer, said data identifying one of said shared resources and indicating whether said shared resource is locked by a second processor;
examining said data to determine if said shared resource is locked by said second processor;
preparing new data for writing to said lock record data structure, said new data identifying said first processor and indicating that said first processor owns a lock on a first resource;
transmitting said data and said new data to said lock record data structure;
re-reading data from said first entry from said lock record data structure;
comparing said re-read data to said data; and
if said re-read data matches said data, writing said new data to said entry in said lock record data structure.
7 Assignments
0 Petitions
Accused Products
Abstract
A shared resource lock mechanism is provided which enables processors in a mullet-processor environment which each share common resources to obtain locks on those resources using a read modify write type transaction which does not at any point in time require the locking of a bus or a memory which contains the lock records used to lock the particular resources.
-
Citations
5 Claims
-
1. A method of providing lock services for shared resources comprising the steps of:
-
transmitting by a first processor, a read request over a bus to a first entry in a lock record data structure; reading data from said first entry into a first buffer, said data identifying one of said shared resources and indicating whether said shared resource is locked by a second processor; examining said data to determine if said shared resource is locked by said second processor; preparing new data for writing to said lock record data structure, said new data identifying said first processor and indicating that said first processor owns a lock on a first resource; transmitting said data and said new data to said lock record data structure; re-reading data from said first entry from said lock record data structure; comparing said re-read data to said data; and if said re-read data matches said data, writing said new data to said entry in said lock record data structure.
-
-
2. A data processing system having access to a shared resource said data processing system comprising:
-
a plurality of processing units coupled to a memory via at least one bus; a lock manager within said memory for reading a lock record and analyzing lock record data, said lock record data corresponding to said shared resource and indicating whether one of said plurality of processing units has locked said shared resource, said lock manager responsive to receipt, from one of said processing units, of a first lock record data byte and a second lock record data byte for determining if a resource associated with said first and second data byte is locked by another one of said processing units and for granting a lock of said shared resource to said one processing unit when said shared resource is not locked by said other one of said processing units.
-
-
3. A method of managing shared resources by a memory coupled to a processor in a data processing system comprising the steps, performed by said memory of:
-
requesting, by said processor, a lock on one of said shared resources; receiving a first lock data byte and a second lock data byte; comparing said second lock data byte to a lock record data byte of said memory, if said second lock data byte and said lock record data byte match, overwriting said lock record data byte with said first lock data byte and; prior to receiving said first lock data byte and said second lock data byte, transmitting to said processor, data read from a location corresponding to said lock record data byte, said data being equal to said second lock data byte.
-
-
4. A lock manager for managing locks in a data processing system without locking memories or buses of said data processing system, said lock manager comprising:
-
a lock record data structure for storing lock records associated with shared resources of said data processing system; a first temporary lock record data buffer; a second temporary lock record data buffer; an interface for receiving data and placing said data in said first and second temporary lock record data buffers; a comparator for comparing data in said second lock record data buffer to data stored in a lock record of said lock record data structure; and an updater, responsive to said comparator, for overwriting said data in said lock record of said lock record data structure when said data in said second lock record data buffer is equal to said data stored in a lock record of said lock record data structure. - View Dependent Claims (5)
-
Specification