Realtime Spinlock System for Processor Resource Access

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Spinlocks in computing systems can be inefficient when a locked resource is held for a long time, causing other threads to waste time spinning and increasing the risk of being interrupted, especially in single-processor systems where threads of equal priority continue to spin until the holding thread is rescheduled.

Innovation Solution

Implementing a policy-based real-time spinlock system that allows processors to run interrupts while waiting for a resource, granting access based on availability and implementing policies such as immediate access for ready processors, priority reassignment, or deletion of outstanding requests to optimize resource access.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If a processor waits in a spinlock for a locked resource, then it can immediately access the resource when available, but it wastes time spinning and increases the risk of being interrupted

Engineering Contradiction:
Improveresponse speed to resource availabilityVSAvoidtime spent spinning
Core Design Contradiction:
SpeedVSLoss of time

Solution Approach 1:

The spinlock implementation dynamically adjusts the waiting behavior of processors. When a resource becomes available, the system checks whether waiting processors are available to immediately execute the resource. If processors are unavailable (e.g., interrupted or busy), the system skips them and grants access to the next available processor in the wait queue, making the resource allocation dynamic and adaptive rather than static and sequential.

Inventive Principle:
Principle #15Dynamics

2Duration of action of moving object

If a locked resource is held for a long time, then the holding thread can complete its task, but other threads waste time spinning and are more likely to be interrupted

Engineering Contradiction:
Improveduration of resource holdingVSAvoidthread execution efficiency
Core Design Contradiction:
Duration of action of moving objectVSProductivity

Solution Approach 1:

The system performs preliminary actions by maintaining a wait queue of processors that are interested in the locked resource. When the resource becomes available, instead of having processors spin continuously, the system has already prepared the list of waiting processors and can immediately check their availability status, granting access to the first available processor without unnecessary spinning delays.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The spinlock mechanism incorporates feedback by continuously monitoring the availability status of processors in the wait queue. When a processor becomes available (not interrupted or busy), the system detects this state and immediately grants resource access, creating a feedback loop that optimizes resource allocation based on real-time processor states.

Inventive Principle:
Principle #23Feedback

3Reliability

If processors continuously spin waiting for a resource, then they maintain readiness to execute, but unnecessary spinning occurs when other processors are busy

Engineering Contradiction:
Improveprocessor readinessVSAvoidenergy spent on unnecessary spinning
Core Design Contradiction:
ReliabilityVSLoss of energy

Solution Approach 1:

The system serves itself by automatically managing the wait queue and processor availability checks. When a resource becomes available, the spinlock mechanism autonomously iterates through the wait queue, checks processor availability, and grants access without requiring continuous active spinning by processors. This self-service approach eliminates wasteful spinning while maintaining processor readiness.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS8707315B2Method and system for implementing realtime spinlocks
Publication Date: 2014.04.22 WIND RIVER SYSTEMS INC
  • US8707315B2 patent drawing
  • US8707315B2 patent drawing
  • US8707315B2 patent drawing

AI summary

A system and method for receiving a request from a requester for access to a computing resource, instructing the requester to wait for access to the resource when the resource is unavailable and allowing the requester to perform other tasks while waiting, determining whether the requester is available when the resource subsequently becomes available, and granting access to the resource by the requester if the requester is available.