Segmented Global Variable Access for High-Concurrency CAS Control

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The increasing number of computer cores and thread concurrency leads to a high failure rate and exponential overheads in CAS operations, particularly in high-concurrency scenarios, resulting in a bottleneck that hampers computer performance.

Innovation Solution

Divide a global variable controlling thread access into multiple variable sub-areas, group threads into corresponding sub-groups, and allow only one thread per group to modify a flag bit in each sub-area, ensuring independent modifications and reducing conflicts.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If multiple threads concurrently perform CAS operations on a single global variable, then thread concurrency is supported, but the failure rate of CAS operations increases and overheads increase exponentially

Engineering Contradiction:
Improvethread concurrencyVSAvoidCAS operation success rate
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent divides the global variable into multiple variable sub-areas, where each sub-area can be independently modified by threads in corresponding thread groups. This segmentation allows multiple threads to successfully perform CAS operations simultaneously on different sub-areas, thereby reducing the failure rate and overheads while maintaining support for high thread concurrency.

Inventive Principle:
Principle #1Segmentation

2Ease of operation

If multiple threads concurrently modify a global variable, then thread access control is implemented, but modification success rate decreases and resource waste increases

Engineering Contradiction:
Improvethread access controlVSAvoidmodification success rate
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The global variable is segmented into multiple variable sub-areas, and threads are grouped into multiple thread groups with each group corresponding to a specific sub-area. Threads within a group can independently modify their designated sub-area without interfering with other groups, thereby maintaining access control while significantly improving modification success rate and reducing resource waste.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Different thread groups are authorized to modify specific variable sub-areas, creating a local quality distribution where each group has exclusive or preferential access to its designated sub-area. This local authorization reduces conflicts between threads and improves overall modification success rate.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS20260104948A1Multi-Thread Concurrency Management Method and Related Apparatus
Publication Date: 2026.04.16 HUAWEI TECH CO LTD
  • US20260104948A1 patent drawing
  • US20260104948A1 patent drawing
  • US20260104948A1 patent drawing

AI summary

A multi-thread concurrency management method includes dividing a target global variable into multiple variable sub-areas, where the target global variable is used to control multiple threads to access target data, and each variable sub-area in the multiple variable sub-areas includes one or more flag bits; grouping the multiple threads into multiple thread groups, where the multiple threads are used to apply for a permission to read the target data; authorizing a target thread in a target thread group to modify a flag bit in a target variable sub-area, where one thread group in the multiple thread groups one-to-one corresponds to one variable sub-area in the multiple variable sub-areas; and if the target thread successfully modifies the flag bit, allowing the target thread to read the target data.