Lock management system, lock management method and lock management program
First Claim
1. A lock management method performed by a multi-processor, the method comprising the steps of:
- carrying out a lock acquisition process for a thread according to one or more lock modes, at least a portion of the lock modes being a shared lock that can be acquired by one or more threads;
managing the number of threads acquiring a lock, by first information which can express the number of threads by one word that can be handled by an indivisible access command of the multi-processor, and second information representing a whole range of the number of threads that can possibly acquire a lock in each lock mode;
investigating the number of threads that have acquired a lock in a requested lock mode, from the first information;
increasing a value of the first information by the indivisible access command and increasing a value of the second information by an indivisible calculation command, if the number of threads is less than a maximum value that can be expressed by the first information; and
increasing the value of the second information by the indivisible access command if the number of threads is equal to or greater than the maximum value that can be handled by the first information.
1 Assignment
0 Petitions
Accused Products
Abstract
Provided is a lock management system, a lock management method and a lock management program whereby lock acquisition and release processes can be carried out at high speed.
A lock management system 1 having a multiprocessor includes: a lock acquisition process 310 for carrying out a lock acquisition process for a thread according to one or more lock modes, at least a portion of the lock modes being a shared lock that can be acquired by one or more threads; and lock status holding means 410 for managing the number of threads acquiring a lock, by first information which can express the number of threads by one word that can be handled by an indivisible access command of the multi-processor, and second information representing a whole range of the number of threads that can possibly acquire a lock in each lock mode.
-
Citations
6 Claims
-
1. A lock management method performed by a multi-processor, the method comprising the steps of:
-
carrying out a lock acquisition process for a thread according to one or more lock modes, at least a portion of the lock modes being a shared lock that can be acquired by one or more threads; managing the number of threads acquiring a lock, by first information which can express the number of threads by one word that can be handled by an indivisible access command of the multi-processor, and second information representing a whole range of the number of threads that can possibly acquire a lock in each lock mode; investigating the number of threads that have acquired a lock in a requested lock mode, from the first information; increasing a value of the first information by the indivisible access command and increasing a value of the second information by an indivisible calculation command, if the number of threads is less than a maximum value that can be expressed by the first information; and increasing the value of the second information by the indivisible access command if the number of threads is equal to or greater than the maximum value that can be handled by the first information. - View Dependent Claims (2, 3)
-
-
4. A non-transitory storage medium storing a lock management program which causes a lock management system having a multi-processor to execute the steps of:
-
carrying out a lock acquisition process for a thread according to one or more lock modes, at least a portion of the lock modes being a shared lock that can be acquired by one or more threads; managing the number of threads acquiring a lock, by first information which can express the number of threads by one word that can be handled by an indivisible access command of the multi-processor, and second information representing a whole range of the number of threads that can possibly acquire a lock in each lock mode; investigating the number of threads that have acquired a lock in a requested lock mode, from the first information; increasing a value of the first information by the indivisible access command and increasing a value of the second information by an indivisible calculation command, if the number of threads is less than a maximum value that can be expressed by the first information; and increasing the value of the second information by the indivisible access command if the number of threads is equal to or greater than the maximum value that can be handled by the first information. - View Dependent Claims (5, 6)
-
Specification