Block-Based Task Stealing in Ring Queues With Lower Core Contention
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing task stealing mechanisms in processor cores with concurrent processing lead to high performance overheads and reduced reliability due to cache misses and synchronization issues in ring queues.
Innovation Solution
Implement a block management mechanism on ring queues, allowing tasks to be stolen from blocks with specific permissions, reducing synchronization overheads by using intra-block metadata and minimizing contention between processor cores.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If task stealing is performed from a ring queue using global metadata, then task stealing functionality is achieved, but synchronization overheads increase and system performance decreases
Solution Approach 1:
The ring queue is divided into multiple blocks, each with independent metadata. This segmentation allows task stealing operations to work on individual blocks rather than the entire queue, reducing synchronization scope and overhead while maintaining reliability through localized metadata management.
Solution Approach 2:
Each block in the ring queue has its own metadata stored locally, enabling independent access and manipulation without requiring global synchronization. This local quality approach allows multiple processor cores to simultaneously perform write, obtain, and stealing operations on different blocks without contention.
2Ease of operation
If task stealing is performed from the queue head or tail of the ring queue, then task stealing is implemented, but contention between different processor cores increases
Solution Approach 1:
The ring queue is segmented into multiple blocks distributed across different positions. Task stealing can occur from any block that has the stealing permission bit set, not just from the queue head or tail. This distribution reduces contention by providing multiple access points throughout the queue structure.
Solution Approach 2:
The patent introduces a new dimension for task stealing by allowing operations on intermediate blocks rather than being constrained to the traditional queue head/tail endpoints. The stealing permission bit provides an additional control dimension that enables flexible, contention-free access to tasks throughout the queue.
3Device complexity
If write operation and obtaining operation are performed on the same ring queue block, then queue operations are simplified, but cache misses occur and performance overhead increases
Solution Approach 1:
Each block is assigned a permission state (write permission, obtaining permission, or stealing permission) that determines which operations can be performed on it. This local quality differentiation allows the system to avoid cache misses by ensuring that write and obtaining operations occur on different blocks, while still maintaining simple operation logic through the permission bit mechanism.
Data Source
AI summary
A task stealing method is disclosed for a computer device that includes a plurality of processor cores. The method includes: when a ring queue associated with a first processor core of the plurality of processor cores is empty, stealing a to-be-processed first task from a first block that has stealing permission and that is in a ring queue associated with a second processor core of the plurality of cores, and processing the first task. In this way, block management is performed, by using a block management mechanism, on the ring queue associated with the processor core, so that the task is allowed to be stolen starting from the block that has the stealing permission and that is in the ring queue, and a write operation or an obtaining operation may also be performed on another block in the ring queue.


