Adaptive Lock for Multicore Systems with Suspendable Threads

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing techniques for operating locks in multicore computing systems are inadequate for managing both suspendable and non-suspendable threads across multiple runtime environments, as they primarily focus on suspendable threads and do not account for the presence of non-suspendable threads.

Innovation Solution

A method for operating a lock in a computing system with multiple processing units, where threads can be either suspendable or non-suspendable, involves determining the suspendability of the holder thread and configuring the requester thread to either spin or wait, depending on the holder's status, and includes a wait queue for suspended threads to be resumed when the lock is released.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If existing lock techniques are used in multicore systems with multiple runtime environments, then suspendable threads can be managed, but non-suspendable threads cannot be properly handled

Engineering Contradiction:
Improvethread type compatibilityVSAvoidlock operation correctness
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The lock operation mode is dynamically adjusted based on the holder thread's suspendability status. When the holder is non-suspendable, requester threads spin continuously. When the holder is suspendable, requester threads are added to a wait queue. This dynamic adaptation allows the same lock mechanism to correctly handle different thread types without compromising reliability.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system changes the operational parameters of the lock based on thread characteristics. The key parameter change is the state of the requester thread: spinning state for non-suspendable holders versus suspended state in wait queue for suspendable holders. This parameter change enables the lock to be versatile across different thread types while maintaining correct operation.

Inventive Principle:
Principle #35Parameter changes

2Speed

If requester threads continuously spin to acquire a lock held by a non-suspendable thread, then lock acquisition responsiveness is improved, but system resource consumption increases

Engineering Contradiction:
Improvelock acquisition speedVSAvoidprocessing unit resource consumption
Core Design Contradiction:
SpeedVSUse of energy by moving object

Solution Approach 1:

Different resource consumption strategies are applied locally based on the holder thread's characteristics. For non-suspendable holders, requester threads use spinning (higher local resource consumption) to achieve fast acquisition. For suspendable holders, requester threads use wait queue suspension (lower local resource consumption). This local differentiation optimizes the overall system by matching resource usage to actual needs.

Inventive Principle:
Principle #3Local quality

3Use of energy by moving object

If requester threads are added to a wait queue when the holder is suspendable, then system resource efficiency is improved, but lock acquisition time may increase

Engineering Contradiction:
Improveprocessing unit resource consumptionVSAvoidlock acquisition time
Core Design Contradiction:
Use of energy by moving objectVSLoss of time

Solution Approach 1:

The potential harm of increased lock acquisition time is converted into a benefit by efficiently utilizing system resources. When threads are suspended in the wait queue, the processing unit is freed to execute other tasks, improving overall system throughput. The time delay is transformed from a pure loss into an opportunity for better resource utilization, where other threads can make progress while waiting threads are suspended.

Inventive Principle:
Principle #22Blessing in disguise (Convert harm into benefit)

Data Source

PatentUS9424103B2Adaptive lock for a computing system having multiple runtime environments and multiple processing units
Publication Date: 2016.08.23 HONG KONG APPLIED SCI & TECH RES INST
  • US9424103B2 patent drawing
  • US9424103B2 patent drawing
  • US9424103B2 patent drawing

AI summary

A method for operating a lock in a computing system having plural processing units and running under multiple runtime environments is provided. When a requester thread attempts to acquire the lock while the lock is held by a holder thread, determine whether the holder thread is suspendable or non-suspendable. If the holder thread is non-suspendable, put the requester thread in a spin state regardless of whether the requester thread is suspendable or non-suspendable; otherwise determines whether the requester thread is suspendable or non-suspendable unless the requester thread quits acquiring the lock. If the requester thread is non-suspendable, arrange the requester thread to attempt acquiring the lock again; otherwise add the requester thread to a wait queue as an additional suspended thread. Suspended threads stored in the wait queue are allowable to be resumed later for lock acquisition. The method is applicable for the computing system with a multicore processor.