Thread-Level Sleep in Multithreaded Architecture
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional multithreaded architectures lack the granular control over thread execution, preventing application programmers from configuring individual threads to sleep in a manner similar to single-threaded architectures, which restricts the use of familiar programming paradigms for multithreaded applications.
Innovation Solution
A computer-implemented method that allows an executing thread to sleep by parsing a sleep instruction, mapping the sleep time to a timer bit, pausing execution, detecting the bit change, and resuming execution, enabling thread-level sleep control using NANOSLEEP instructions.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If conventional multithreaded architectures are used, then processing throughput is improved, but granular control over individual thread execution is lost
Solution Approach 1:
The patent segments the timer resource into multiple independently controllable timer units, each capable of being allocated to and controlling individual threads. This segmentation enables granular per-thread sleep control while maintaining the multithreaded processing architecture's throughput capabilities.
Solution Approach 2:
The system performs preliminary allocation of timer resources to threads before thread execution begins. By pre-configuring timer associations and sleep duration parameters for each thread, the system establishes granular control mechanisms in advance, allowing threads to be paused and resumed at predetermined intervals without disrupting overall processing throughput.
2Adaptability or versatility
If per-thread sleep control is implemented, then programming flexibility is improved, but system complexity increases
Solution Approach 1:
The patent implements a universal timer allocation mechanism where a pool of timer units can serve multiple threads dynamically. Each timer unit can be allocated to different threads based on demand, providing per-thread sleep control functionality without requiring dedicated hardware for each thread. This multi-functional approach increases programming flexibility while controlling system complexity through resource sharing.
Solution Approach 2:
The system changes the parameter of timer allocation from static (one timer per thread) to dynamic (timers can be allocated and deallocated based on thread state). By allowing timer parameters such as allocation status and associated thread ID to change dynamically, the system achieves high programming flexibility for per-thread sleep control without permanently increasing hardware complexity.
3Ease of operation
If timer resources are allocated to multiple threads, then thread control capability is improved, but resource contention increases
Solution Approach 1:
The patent implements dynamic timer allocation where the association between timers and threads changes based on runtime conditions. Threads can acquire and release timer resources dynamically during execution, allowing the system to adapt to varying thread control needs while minimizing resource contention through flexible resource management rather than static allocation.
Solution Approach 2:
The system enables threads to self-manage their sleep control resources by allocating and deallocating timer units as needed. Each thread can independently request timer resources for sleep control and release them when no longer needed, reducing the need for centralized resource arbitration and minimizing contention overhead while maintaining strong thread control capability.
Data Source
AI summary
A streaming multiprocessor (SM) includes a nanosleep (NS) unit configured to cause individual threads executing on the SM to sleep for a programmer-specified interval of time. For a given thread, the NS unit parses a NANOSLEEP instruction and extracts a sleep time. The NS unit then maps the sleep time to a single bit of a timer and causes the thread to sleep. When the timer bit changes, the sleep time expires, and the NS unit awakens the thread. The thread may then continue executing. The SM also includes a nanotrap (NT) unit configured to issue traps using a similar timing mechanism to that described above. For a given thread, the NT unit parses a NANOTRAP instruction and extracts a trap time. The NT unit then maps the trap time to a single bit of a timer. When the timer bit changes, the NT unit issues a trap.


