CPU-Local Storage Mechanism for Thread Data Isolation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional methods for thread-local storage in multi-threaded applications require tool chain support and complex syntax, making it difficult to manage global/static data uniquely per thread, leading to inefficiencies in resource access and synchronization.
Innovation Solution
Implementing a CPU-local storage mechanism that allows each processor to access unique data, using a processor storage class attribute to manage global/static data, enabling controlled access and affinity for tasks, facilitating multi-instancing and extension of operating systems and applications.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If conventional thread-local storage methods are used with tool chain support and _thread storage class attribute, then thread-specific global data can be managed, but the syntax becomes complex and resource access synchronization becomes inefficient
Solution Approach 1:
The patent extracts the thread-local storage functionality from the complex compiler tool chain and _thread attribute syntax, implementing it directly at the CPU hardware level through dedicated storage registers. This removes the need for complex high-level language syntax while maintaining thread-specific data isolation, as each thread automatically has access to its own CPU-local storage without requiring compiler interventions or special syntax annotations.
2Reliability
If conventional thread-local storage methods are used, then thread-specific data can be stored, but resource access synchronization becomes inefficient due to shared memory locations
Solution Approach 1:
The patent segments the shared memory space by implementing CPU-local storage that is physically divided and dedicated to each individual CPU core. Instead of having all threads share common memory locations with complex synchronization requirements, each CPU has its own isolated storage region. This segmentation eliminates the need for synchronization overhead when threads access their respective data, as each CPU independently accesses its own local storage without interfering with other CPUs.
3Adaptability or versatility
If multi-threaded applications use conventional storage mechanisms, then global variables can be shared, but managing unique data per thread requires complex tool chain support
Solution Approach 1:
The patent implements self-service by enabling each CPU core to automatically manage its own local storage without requiring external tool chain support or compiler interventions. The CPU hardware itself provides the thread-local storage functionality through dedicated registers and memory regions, making the system self-sufficient. This eliminates the need for complex compiler tool chains, special storage class attributes, or runtime library support that would otherwise be required to achieve thread data isolation.
Data Source
AI summary
Described herein are systems and methods for implementing a processor-local (e.g., a CPU-local) storage mechanism. An exemplary system includes a plurality of processors executing an operating system, the operating system including a processor local storage mechanism, wherein each processor accesses data unique to the processor based on the processor local storage mechanism. Each of the plurality of processors of the system may have controlled access to the resource and each of the processors is dedicated to one of a plurality of tasks of an application. The application including the plurality of tasks may be replicated using the processor local storage mechanism, wherein each of the tasks of the replicated application includes an affinity to one of the plurality of processors.


