Busy Resource Encoder for Thread Spin Yield Decisions

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional computer systems face inefficiencies in thread synchronization due to wasteful spinning, difficulty in implementing spinlocks, and lack of predictability in deciding between spinning and yielding, especially on single-processor systems and with high-level languages.

Innovation Solution

A busy resource encoder is introduced to provide finer control over spin versus yield decisions by updating a BUSY code that indicates the progress of resource usage, allowing threads to make informed choices based on the expected availability of resources.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If a thread spins to wait for a resource lock, then the thread can quickly detect when the resource becomes available, but the thread wastes processing time and energy continuously checking the lock status

Engineering Contradiction:
Improveresponse speed to resource availabilityVSAvoidprocessing time waste
Core Design Contradiction:
SpeedVSLoss of energy

Solution Approach 1:

The system performs preliminary action by having the resource owner thread proactively update the busy encoding with an estimated completion time before the resource is actually released. This allows waiting threads to make informed decisions about whether to spin or yield based on the predicted availability time, rather than blindly spinning without knowing when the resource will be free.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system implements feedback by providing waiting threads with information about the expected resource availability time through the busy encoding. This feedback mechanism allows threads to adjust their waiting strategy dynamically - spinning when the resource will be available soon, or yielding when it will take longer, thereby reducing wasted processing time while maintaining quick response when appropriate.

Inventive Principle:
Principle #23Feedback

2Ease of manufacture

If conventional systems use fixed spin/yield decisions, then implementation is simple, but the systems cannot adapt to varying resource availability scenarios

Engineering Contradiction:
Improveimplementation simplicityVSAvoidadaptability to resource availability
Core Design Contradiction:
Ease of manufactureVSAdaptability or versatility

Solution Approach 1:

The system applies dynamics by making the spin/yield decision adaptive rather than fixed. The busy encoding dynamically reflects the current resource usage state and estimated completion time, allowing waiting threads to adjust their strategy based on real-time conditions. This enables the system to handle varying resource availability scenarios effectively while maintaining implementation feasibility through the structured encoding approach.

Inventive Principle:
Principle #15Dynamics

3Reliability

If threads spin on a single-processor system, then they can detect resource availability immediately, but other threads of the same priority waste their full quantum spinning without progress

Engineering Contradiction:
Improveresource acquisition reliabilityVSAvoidsystem throughput
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system uses feedback through the busy encoding to provide information about resource availability timing to all waiting threads. This allows the scheduler to make informed decisions about thread scheduling - knowing when resources will be available helps prevent multiple threads from wasting their full quantum spinning, thereby improving system throughput while maintaining reliable resource acquisition.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS9223637B1Method and apparatus to advise spin and yield decisions
Publication Date: 2015.12.29 SUN MICROSYSTEMS INC
  • US9223637B1 patent drawing
  • US9223637B1 patent drawing
  • US9223637B1 patent drawing

AI summary

Methods and apparatus provide for a busy resource encoder to allow for a finer control of spin versus yield decisions. Specifically, the busy resource encoder allows for the execution a first thread, where the first thread is using a particular resource. Additionally, the busy resource encoder allows for the execution of a second thread, where the second thread requires use of the resource which is locked due to first thread execution. The busy resource encoder creates a busy code to indicate the progress of the execution of the first thread in relation to use of the resource by the first thread. The second thread can then read the busy code to determine to execute one of a spin and a yield routine by the second thread.