# US 2025/0094242 A1 · Chained resource locking

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

- Number: US 2025/0094242 A1
- Document ID: US20250094242A1
- Status: Published application
- Kind: A1
- Application number: 18/959,384
- Filed: 2024-11-25
- Published: 2025-03-20
- Earliest claimed: 2021-08-18
- Assignees: Micron Technology, Inc.
- Applicants: Micron Technology, Inc.
- Inventors: Patrick Estep; Tony M. Brewer
- Web page: https://patentgrep.com/patent/US20250094242A1

## CPC

- G06F 9/526: {Mutual exclusion algorithms}
- G06F 9/5005: {to service a request}
- G06F 9/542: {Event management; Broadcasting; Multicasting; Notifications}
- G06F 2209/521: Atomic
- G06F 2209/548: Queue
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Devices and techniques for chained resource locking are described herein. Threads form a last-in-first-out (LIFO) queue on a resource lock to create a chained lock on the resource. A data store representing the lock for the resource holds the previous thread's identifier, enabling a subsequent thread to wake the previous thread using the identifier when the subsequent thread releases the lock. Generally, the thread releasing the lock need not interact with the data store, reducing contention for the data store among many threads.

## Claims

### Claim 1

A processor comprising:
a register; and
processing circuitry that, when in operation, is configured to:
read, by a first thread executing on the processor, a thread ID for a second thread stored in the register corresponding to a resource;
overwrite, by the first thread, the thread ID for the second thread with a thread ID for the first thread;
sleep, by the first thread;
wake, by the first thread, based on a wake message sent by a third thread upon release of the resource, the third thread having read the thread ID for the first thread from the register after the first thread was sleeping; and
execute, by the first thread, a task that uses the resource based on waking from the wake message sent by the third thread.

### Claim 2 (depends on 1)

The processor of claim 1, wherein the processing circuitry is configured to:
complete, by the first thread, the task; and
send, by the first thread, a wake message to the second thread to indicate that the resource is no longer in use by the first thread.

### Claim 3 (depends on 2)

The processor of claim 2, wherein the thread ID for the second thread is maintained in a data space for the first thread until the wake message to the second thread is sent.

### Claim 4 (depends on 1)

The processor of claim 1, wherein the thread ID for the second thread is overwritten in the register prior to the second thread getting access to the resource.

### Claim 5 (depends on 1)

The processor of claim 1, wherein the register is sixty-four bits.

### Claim 6 (depends on 1)

The processor of claim 1, wherein the first thread and the second thread are links in a last-in-first-out (LIFO) chain that includes at least one other thread.

### Claim 7 (depends on 6)

The processor of claim 6, wherein threads that make up the LIFO chain read the register to access the resource while the resource is being used by a primary thread, and wherein a different LIFO chain is created when a different thread than the primary thread holds the resource when a new thread reads the register to access the resource.

### Claim 8 (depends on 1)

The processor of claim 1, wherein the register can hold exactly three types of values, a first type that indicates that no thread is using the resource, a second type that is a thread ID of a thread waiting to use the resource, and a third type that indicates that the resource is in use without identifying a thread that is using the resource.

### Claim 9 (depends on 8)

The processor of claim 8, wherein a given thread that encounters the first type uses the resource immediately.

### Claim 10 (depends on 9)

The processor of claim 9, wherein the given thread reads the register upon completion of use of the resource to get a next thread ID to send a wake message to enable a next thread to use the resource.

### Claim 11 (depends on 9)

The processor of claim 9, wherein a given thread that encounters the second type or the third type waits until a wake message from a different thread to use the resource, the different thread having used the resource prior to the given thread.

### Claim 12

A non-transitory machine readable media including instructions that, when executed by processing circuitry of a processor, cause the processing circuitry to perform operations comprising:
reading, by a first thread, a thread ID for a second thread stored in a register corresponding to a resource;
overwriting, by the first thread, the thread ID for the second thread with a thread ID for the first thread;
sleeping, by the first thread;
waking, by the first thread, based on a wake message sent by a third thread upon release of the resource, the third thread having read the thread ID for the first thread from the register after the first thread was sleeping; and
executing, by the first thread, a task that uses the resource based on waking from the wake message sent by the third thread.

### Claim 13 (depends on 12)

The non-transitory machine readable media of claim 12, wherein the operations comprise:
completing the task; and
sending a wake message to the second thread to indicate that the resource is no longer in use by the first thread.

### Claim 14 (depends on 13)

The non-transitory machine readable media of claim 13, wherein the thread ID for the second thread is maintained in a data space for the first thread until the wake message to the second thread is sent.

### Claim 15 (depends on 12)

The non-transitory machine readable media of claim 12, wherein the thread ID for the second thread is overwritten in the register prior to the second thread getting access to the resource.

### Claim 16 (depends on 12)

The non-transitory machine readable media of claim 12, wherein the first thread and the second thread are links in a last-in-first-out (LIFO) chain that includes at least one other thread.

### Claim 17 (depends on 16)

The non-transitory machine readable media of claim 16, wherein threads that make up the LIFO chain read the register to access the resource while the resource is being used by a primary thread, and wherein a different LIFO chain is created when a different thread than the primary thread holds the resource when a new thread reads the register to access the resource.

### Claim 18 (depends on 12)

The non-transitory machine readable media of claim 12, wherein the register can hold exactly three types of values, a first type that indicates that no thread is using the resource, a second type that is a thread ID of a thread waiting to use the resource, and a third type that indicates that the resource is in use without identifying a thread that is using the resource.

### Claim 19 (depends on 18)

The non-transitory machine readable media of claim 18, wherein a given thread that encounters the first type uses the resource immediately.

### Claim 20 (depends on 19)

The non-transitory machine readable media of claim 19, wherein the given thread reads the register upon completion of use of the resource to get a next thread ID to send a wake message to enable a next thread to use the resource.
