Shared resource managing method and system
Abstract
In a method of and a system for managing access to shared resource elements between processes subjected to parallel processing by use of a hash table under a multiprocessor environment or a multi-task processing environment, each of entries of the hash table pointer information indicative of a pointer to any one of the resource elements, counter information for holding the occurrence of registration into the hash table and counter information for limiting the number of times of search for has table entry, and the entry of the hash table is updated by an instruction which performs as inseparable operation of referring to a status variable on a main storage and updating the status variable in accordance with the value thereof. Thereby, the management of data suitable for high-speed access to a large quantity of data elements on the main storage can be performed with no lock operation under the multiprocessor environment or the multi-task processing environment.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1. A method of serializing a plurality of accesses to a plurality of shared resource elements between a plurality of parallel processes through direct use of a single hash table in which each access to each resource element is managed by an instruction which performs an operation of both accessing a status variable in a main storage and updating the status variable in accordance with the value accessed thereof, said method comprising: providing entries of said hash table, each of which entry has a pointer pointing to a one of the resource elements and a first counter indicating a request from a first parallel process for a registration of a first resource element into said hash table as a first value; and updating at least a part of an entry of said hash table by said instruction while detecting a process collision on access to said first counter caused by a second parallel process based on whether said first value of said first counter is changed by the second process.
2. The method according to claim 1, further comprising the steps of: providing a second counter indicating an uppermost limit of a number of times a search of said hash table is to be performed by said request from said first process related to a registration process of a resource element in an entry of said hash table, the number of times of the search being determined by a counting up operation in said registration process of each resource element; and, updating each entry of said hash table including said second counter by a read-modify-write instruction in the registration process.
3. The method according to claim 2, further comprising a step of judging whether the resource element to be accessed through the pointer is present or absent in said hash table by searching with the uppermost limit of entries in said hash table indicated by said second counter which indicates an entry in said hash table having said pointer indicating the resource element.
4. The method according to claim 1 further comprising performing a read-modify-write instruction as said instruction according to a Compare and Swap instruction operation.
5. The method according to claim 1, wherein the step of updating comprises updating said first counter in each entry in said hash table when registering each resource element having a hash value obtained from hashing a key value of the resource element corresponding to each said entry in said hash table.
6. A method of serializing access to shared resource elements between a plurality of parallel processes by use of a hash table having entries, said method comprising the step of updating each entry of said hash table including a pointer indicating a first one of the resource elements, a registration counter for storing and indicating occurrence of a registration of an access request from each process into said hash table, and a search counter for storing and indicating a number of times of search into overflow entries of said hash table, by a read-modify-write instruction while maintaining the integrity of data therebetween, said read-modify-write instruction performing both an access to a status variable in a main storage and an updating of the storage variable in accordance with the value accessed.
7. A system for serializing access to shared resource elements in a data element pool between a plurality of parallel processes by use of a hash table, in which the access of each of the processes to each resource element is managed by an instruction which performs an inseparable operation of both referencing a status variable in a main storage and updating the status variable in accordance with the referenced value thereof, said system comprising: information storing means for storing entries of said hash table, each of which entry has a pointer indicating one of the resource elements and a first counter indicating a request from a process related to a registration of a resource element into said hash table; and, hash table operation logic means for updating at least a part of an entry of said hash table by said instruction for performing the inseparable operation on the main storage according to a first process while detecting a process collision on access to said first counter occurring from a second process on the basis of whether or not a value of said first counter is changed by the second process.
8. The system according to claim 7, further comprising means for judging whether the resource element to be accessed through said pointer is present or absent in said hash table by searching with an uppermost number of entries in said hash table indicated by a search counter which indicates an entry in said hash table having said pointer indicating the resource element.
9. A system for serializing access to shared resource elements between a plurality of parallel processes by use of a hash table, said system comprising: hash table storing means for storing entries of said hash table, each of which entry has a pointer indicating one of the resource elements, a registration counter storing and indicating occurrence of resource element registration into said hash table, and a search counter storing and indicating a number of times of search into said hash table; and, hash table operation logic means for updating an entry of said hash table by an instruction which performs an inseparable operation of both accessing a status variable in a main storage and updating the status variable in accordance with the accessed value thereof.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.