Lock-Free Function Queue for Many-Core Execution Control
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional software development methods face challenges in ensuring reproducibility and predictability of program execution states, particularly in concurrent execution on multiple cores, leading to difficulties in guaranteeing worst-case response times and efficient utilization of many-core processors due to unscaled inter-core communication and data conflict issues.
Innovation Solution
A program execution control method employing a lock-free function queue with process barriers that separate functions in data conflict, allowing concurrent execution of conflict-free functions by multiple cores and temporal separation of conflicting functions, thereby minimizing synchronization waiting dead time and optimizing parallelization performance.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If functions are concurrently executed on multiple cores without explicit allocation, then processor utilization improves, but data conflict and non-deterministic execution states occur
Solution Approach 1:
The function queue is segmented into multiple independent queues, each assigned to a specific core. This segmentation eliminates data conflict between cores while maintaining concurrent execution, as each core operates on its own queue without accessing shared function data structures.
Solution Approach 2:
A lock-free function queue mechanism acts as an intermediary between function submission and core execution. The queue uses atomic operations and memory barriers to mediate access without traditional locks, enabling concurrent execution while maintaining execution state predictability through ordered function retrieval.
2Reliability
If traditional lock-based synchronization is used to prevent data conflict, then data integrity is maintained, but synchronization waiting dead time increases
Solution Approach 1:
Traditional mechanical lock-based synchronization is replaced with a lock-free queue implementation using atomic memory operations. This substitution eliminates the need for cores to wait for lock acquisition, removing synchronization waiting dead time while maintaining data integrity through atomic read-modify-write operations and memory barriers.
3Reliability
If static task allocation is optimized at design time, then worst-case response time can be guaranteed, but adaptability to disturbance loads such as interrupts deteriorates
Solution Approach 1:
The system transitions from static task allocation to dynamic function queue assignment. Functions are dynamically added to appropriate core queues based on current system state and interrupt conditions, allowing the system to adapt to disturbance loads while maintaining response time guarantees through the structured queue architecture that preserves execution ordering.
4Adaptability or versatility
If inter-core communication paths are increased to N*(N-1)/2 for N cores, then task allocation flexibility improves, but hardware complexity and cost increase
Solution Approach 1:
Each core is equipped with a universal function queue data structure that can handle any function assignment. This multi-functional approach eliminates the need for dedicated communication paths between specific core pairs, as any core can retrieve functions from its own queue regardless of which core submitted the function, reducing communication infrastructure complexity.
Data Source
AI summary
To be capable of concurrent execution of a function group not in data conflict by a plurality of cores and to execute a function pair in data conflict in a temporal separation manner. A process barrier 20 includes N−1 checker functions 22 and one limiter function 23, where the number of cores capable of concurrently executing the functions is N (N is an integer equal to or greater than 2), the checker functions 22 determine whether the head entry of a lock-free function queue LFQ1 is either the checker function 22 or the limiter function 23, and repeats reading of the head entry of the lock-free function queue LFQ1 if either, and ends processing if neither, and the limiter function 23 is an empty function ending without performing any processing.


