# US 2016/0253275 A1 · Information processing device, information processing system, and exclusive control program

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2016/0253275 A1
- Document ID: US20160253275A1
- Status: Published application
- Kind: A1
- Application number: 15/011,716
- Filed: 2016-02-01
- Published: 2016-09-01
- Earliest claimed: 2015-02-26
- Assignees: Fujitsu Limited
- Applicants: Fujitsu Limited
- Inventors: Masato FUKUMORI
- Web page: https://patentgrep.com/patent/US20160253275A1

## CPC

- G06F 13/16: for access to memory bus (G06F13/28 takes precedence)
- G06F 13/364: using independent requests or grants, e.g. using separated request and grant lines
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

An information processing device has process execution units that execute respective processes; a lock variable storage device that stores, with respect to a lock relating to a common resource accessed by the process execution units, a lock variable having a lock state flag and a lock identification information which is updated when lock being acquired; and an exclusive control device that executes first lock acquisition processing, including, when the lock state flag is the lock release state, updating the lock state flag to the lock acquisition state, and updating the lock identification information to newly updated one, to acquire the lock, and second lock acquisition processing, including, when the lock state flag is the lock acquisition state, updating the lock identification information to newly updated lock identification information to acquire the lock, after a time-out time elapses while the lock variable maintains the same lock identification information.

## Claims

### Claim 1

An information processing device comprising:
a plurality of process execution units that execute respective processes;
a lock variable storage device that stores, with respect to a lock relating to a common resource which is accessed by the plurality of process execution units, a lock variable having a lock state flag indicating a lock acquisition state and a lock release state, and a lock identification information which is updated each time the lock is acquired; and
an exclusive control device that executes
first lock acquisition processing, which includes, when the lock state flag is the lock release state, updating the lock state flag of the lock variable in the lock variable storage device to the lock acquisition state, and updating the lock identification information of the lock variable to newly updated lock identification information, to acquire the lock for the process execution unit, and
second lock acquisition processing, which includes, when the lock state flag is the lock acquisition state, updating the lock identification information of the lock variable in the lock variable storage device to newly updated lock identification information to acquire the lock for the process execution unit, after a predetermined time-out time elapses while the lock variable in the lock variable storage device maintains the same lock identification information.

### Claim 2 (depends on 1)

The information processing device according to claim 1, wherein
in the first lock acquisition processing, the exclusive control device:
reads the lock variable at a predetermined timing and sets the read-out variable to an old value;
when the lock state flag of the old value is the lock release state, sets a lock variable, in which the lock state flag is the lock acquisition state and the lock identification information is the newly updated lock identification information, to a new value; and
executes, with an atomic instruction, compare-and-swap processing of comparing the old value and the lock variable in the lock variable storage device and swapping the lock variable in the lock variable storage device to the new value, provided that the result of the comparing is matched.

### Claim 3 (depends on 1)

The information processing device according to claim 1, wherein
in the second lock acquisition processing, the exclusive control device:
at a first timing, when the lock state flag of the lock variable which has been read from the lock variable storage device is the lock acquisition state, starts time-out determination as to whether or not a predetermined time-out time has elapsed, while the lock variable in the lock variable storage device maintains the same lock identification information; and
at a second timing after the first timing, updates the lock identification information of the lock variable to the newly updated lock identification information when the time-out time has elapsed and when the lock identification information of the lock variable read from the lock variable storage device at the second timing is the same as the lock identification information read at the first timing.

### Claim 4 (depends on 3)

The information processing device according to claim 3, wherein
in the processing of updating the lock identification information of the lock variable to the newly updated lock identification information in the second lock acquisition processing, the exclusive control device:
sets the lock variable which has been read at the second timing to the old value;
sets a lock variable, in which the lock state flag is the lock acquisition state and the lock identification information is the newly updated lock identification information, to a new value; and
executes, with an atomic instruction, compare-and-swap processing of comparing the old value and the lock variable in the lock variable storage device and swapping the lock variable in the lock variable storage device to the new value is executed with an atomic instruction, provided that the result of the comparing is matched.

### Claim 5 (depends on 1)

The information processing device according to claim 1, wherein
the exclusive control device reads the lock variable from the lock variable storage device and, when the read-out lock variable matches a lock variable which has been updated at the time the lock has been acquired, executes lock release processing of updating the lock state flag of the lock variable in the lock variable storage device to the lock release state.

### Claim 6 (depends on 5)

The information processing device according to claim 5, wherein
in the lock release processing, the exclusive control device:
sets the lock variable read from the lock variable storage device to n old value,
sets a lock variable in which the lock state flag is the lock release state to a new value, and
executes, with an atomic instruction, compare-and-swap processing of comparing the old value and the lock variable in the lock variable storage device and swapping the lock variable in the lock variable storage device to the new value, provided that the result of the comparing is matched.

### Claim 7

An information processing system comprising:
a plurality of process execution units that execute respective processes;
a common resource which is accessed by the plurality of process execution units;
a lock variable storage device that stores, with respect to a lock relating to the common resource, a lock variable having a lock state flag indicating a lock acquisition state and a lock release state, and a lock identification information which is updated each time the lock is acquired; and
an exclusive control device that executes
first lock acquisition processing, which includes, when the lock state flag is the lock release state, updating the lock state flag of the lock variable in the lock variable storage device to the lock acquisition state, and updating the lock identification information of the lock variable to newly updated lock identification information, to acquire the lock for the process execution unit, and
second lock acquisition processing, which includes, when the lock state flag is the lock acquisition state, updating the lock identification information of the lock variable in the lock variable storage device to newly updated lock identification information to acquire the lock for the process execution unit, after a predetermined time-out time elapses while the lock variable in the lock variable storage device maintains the same lock identification information.

### Claim 8

A non-transitory computer-readable storage medium storing therein an exclusive control program for causing a computer to execute a process comprising:
accessing a lock variable storage device that stores, with respect to a lock relating to a common resource which is accessed by a plurality of process execution units, each of which executes respective process, a lock variable having a lock state flag indicating a lock acquisition state and a lock release state, and a lock identification information which is updated each time the lock is acquired;
executing first lock acquisition processing, which includes, when the lock state flag is the lock release state, updating the lock state flag of the lock variable in the lock variable storage device to the lock acquisition state, and updating the lock identification information of the lock variable to newly updated lock identification information, to acquire the lock for the process execution unit, and
executing second lock acquisition processing, which includes, when the lock state flag is the lock acquisition state, updating the lock identification information of the lock variable in the lock variable storage device to newly updated lock identification information to acquire the lock for the process execution unit, after a predetermined time-out time elapses while the lock variable in the lock variable storage device maintains the same lock identification information.

### Claim 9 (depends on 8)

The non-transitory computer-readable storage medium according to claim 8, wherein
in the first lock acquisition processing,
reading the lock variable at a predetermined timing and sets the read-out variable to an old value;
when the lock state flag of the old value is the lock release state, setting a lock variable, in which the lock state flag is the lock acquisition state and the lock identification information is the newly updated lock identification information, to a new value; and
executing, with an atomic instruction, compare-and-swap processing of comparing the old value and the lock variable in the lock variable storage device and swapping the lock variable in the lock variable storage device to the new value, provided that the result of the comparing is matched.

### Claim 10 (depends on 8)

The non-transitory computer-readable storage medium according to claim 8, wherein
in the second lock acquisition processing, the exclusive control device:
at a first timing, when the lock state flag of the lock variable which has been read from the lock variable storage device is the lock acquisition state, starting time-out determination as to whether or not a predetermined time-out time has elapsed, while the lock variable in the lock variable storage device maintains the same lock identification information; and
at a second timing after the first timing, updating the lock identification information of the lock variable to the newly updated lock identification information when the time-out time has elapsed and when the lock identification information of the lock variable read from the lock variable storage device at the second timing is the same as the lock identification information read at the first timing.

### Claim 11 (depends on 10)

The non-transitory computer-readable storage medium according to claim 10, wherein
in the processing of updating the lock identification information of the lock variable to the newly updated lock identification information in the second lock acquisition processing,
setting the lock variable which has been read at the second timing to the old value,
setting a lock variable, in which the lock state flag is the lock acquisition state and the lock identification information is the newly updated lock identification information, to a new value, and
executing, with an atomic instruction, compare-and-swap processing of comparing the old value and the lock variable in the lock variable storage device and swapping the lock variable in the lock variable storage device to the new value is executed with an atomic instruction, provided that the result of the comparing is matched.

### Claim 12 (depends on 8)

The non-transitory computer-readable storage medium according to claim 8, the process further comprising:
reading the lock variable from the lock variable storage device and,
when the read-out lock variable matches a lock variable which has been updated at the time the lock has been acquired, executing lock release processing of updating the lock state flag of the lock variable in the lock variable storage device to the lock release state.
