Thread Scheduler Path Locks for Router Processing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current multi-threaded processing systems face inefficiencies due to frequent long-latency memory accesses, leading to increased idle time and the need for additional processors to achieve line rate processing in routers, which complicates exclusive access to shared computational resources and incurs lock overhead and thread switching costs.
Innovation Solution
Implementing a mechanism where a thread scheduler uses unique path identifiers to manage access to shared resources, allowing only one thread to execute instructions associated with a particular path, thereby eliminating the need for locks and reducing thread switches, and using an external thread scheduler to manage thread switching, reducing the workload and clock cycles required for thread transitions.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If traditional multi-threaded processing is used with frequent memory accesses, then processing throughput can be maintained, but idle time increases and additional processors are required
Solution Approach 1:
The patent implements path locks that allow a thread to continuously hold exclusive access to a shared computational resource for an entire instruction path without being preempted by thread switches. This eliminates idle time by ensuring that when a thread acquires a path lock, it can execute the complete path without interruption, maintaining continuous useful action on the processor.
2Productivity
If additional processors are added to achieve line rate processing, then processing capacity increases, but system complexity and lock overhead increase
Solution Approach 1:
The patent segments the instruction execution into distinct paths, where each path that accesses a shared computational resource is assigned a unique path lock identifier. This segmentation allows the system to manage concurrency at the path level rather than requiring fine-grained locking at the instruction level, reducing overall system complexity while maintaining processing capacity.
3Reliability
If traditional locking mechanisms are used for shared resource access, then exclusive access is ensured, but lock overhead and thread switching costs increase
Solution Approach 1:
The patent implements preliminary action by having threads acquire path locks at the beginning of an instruction path before accessing shared computational resources. The thread scheduler grants exclusive access to the entire path in advance, allowing the thread to execute without encountering lock contention or switching overhead during the critical section, thereby eliminating lock overhead while maintaining exclusive access.
Data Source
AI summary
In one embodiment, a method includes receiving at a thread scheduler data that indicates a first thread is to execute next a particular instruction path in software to access a particular portion of a shared computational resource. The thread scheduler determines whether a different second thread is exclusively eligible to execute the particular instruction path on any processor of a set of one or more processors to access the particular portion of the shared computational resource. If so, then the thread scheduler prevents the first thread from executing any instruction from the particular instruction path on any processor of the set of one or more processors. This enables several threads of the same software to share a resource without obtaining locks on the resource or holding a lock on a resource while a thread is not running.


