Patent ID: 9411660
Filing Date: 2016-08-09
CPC Classification: G06F

Claim Text:
1. A lock control apparatus comprising: a control unit that controls acquisition of a lock for using a shared resource shared among a plurality of tasks by a task according to first lock information that indicates whether to permit the tasks to acquire the lock for each combination of a mode of a lock currently acquired by the task and a mode of a lock newly requested for acquisition; and a determining unit that determines whether there occurs a deadlock that prohibits for acquisition of the lock by the tasks when the control unit controls the acquisition of the lock according to the first lock information, wherein when the determining unit determines that there occurs the deadlock for acquisition of the lock, the control unit controls acquisition of the lock by the tasks so as to avoid the deadlock according to second lock information that indicates whether to permit acquisition of the lock for each combination of a mode of a lock currently acquired by the task and a mode of a lock newly requested for acquisition, the acquisition of the lock by a task that has requested for the acquisition of the lock is not permitted according to the first lock information when a mode of a lock currently acquired by the task is an exclusive mode in which only a task that has acquired a lock is permitted to use the shared resource and if a mode of a lock requested by the another task is a shared mode in which any task other than a task that has acquired a lock is also permitted to refer to the shared resource, and the acquisition of the lock by a task that has requested for the acquisition of the lock is permitted according to the second lock information when the mode of a lock currently acquired by the task is the exclusive mode and the mode of a lock requested for acquisition by the another task is the shared mode.