Self-Rescheduling Timer Queue for Lock-Free Event Deadlines

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing timer systems waste resources due to idle wake-ups and inefficient task management when events need to be rescheduled or canceled, particularly in networking protocols where tasks must be triggered with fine granularity, leading to inefficient use of system resources.

Innovation Solution

A timer system utilizing a queue of scheduled events, a collection of rescheduled events, and a collection of events due to be processed, allowing events to self-reschedule without locking queues, ensuring deadlines are refreshed only when events are removed and added back to the appropriate collection, using a skip list for efficient access and a monotonic timeline clock for accurate timing.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If traditional timer systems are used to schedule tasks with fine granularity, then task scheduling precision is improved, but system resource waste increases due to idle wake-ups and inefficient task management

Engineering Contradiction:
Improvetask scheduling precisionVSAvoidsystem resource waste
Core Design Contradiction:
Measurement precisionVSLoss of energy

Solution Approach 1:

The timer system enables events to self-reschedule by automatically refreshing their own deadlines and managing their own queue positions. When an event's deadline is refreshed, it is removed from its current queue position and reinserted at the appropriate position based on the new deadline, eliminating the need for external intervention and reducing resource overhead for task management

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system uses dynamic deadline refreshing where event deadlines are not fixed but can be updated based on current system state and event priority. This allows the timer system to adaptively adjust scheduling precision and resource allocation in real-time, optimizing the balance between scheduling accuracy and resource consumption

Inventive Principle:
Principle #15Dynamics

2Speed

If events are rescheduled frequently in networking protocols, then protocol responsiveness is improved, but queue locking overhead increases reducing system efficiency

Engineering Contradiction:
Improveprotocol responsivenessVSAvoidqueue locking overhead
Core Design Contradiction:
SpeedVSDevice complexity

Solution Approach 1:

The patent extracts the locking mechanism from the event rescheduling process. By using a lock-free data structure where events are rescheduled through atomic operations and pointer manipulations rather than traditional queue locking, the system eliminates the performance bottleneck associated with queue locks while maintaining thread safety and enabling frequent rescheduling operations

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The system replaces the mechanical queue locking mechanism with a software-based lock-free algorithm using atomic compare-and-swap operations. This substitution eliminates the need for physical or logical locks on queue structures, allowing concurrent rescheduling operations without blocking other threads, thus improving protocol responsiveness

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

3Adaptability or versatility

If traditional schedule and cancel techniques are used for task management, then task control flexibility is improved, but resource waste increases due to idle wake-ups

Engineering Contradiction:
Improvetask control flexibilityVSAvoididle wake-ups
Core Design Contradiction:
Adaptability or versatilityVSLoss of energy

Solution Approach 1:

The system performs preliminary actions by pre-calculating and pre-scheduling event deadlines based on current system state and event characteristics. Events are scheduled with optimized deadlines that account for future system conditions, reducing the need for last-minute cancellations and wake-ups while maintaining flexible task control

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The timer system implements feedback mechanisms where the scheduling performance and resource usage are continuously monitored. This feedback is used to dynamically adjust scheduling parameters and event deadlines, optimizing the balance between task control flexibility and resource efficiency by learning from past scheduling outcomes

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS20250383917A1Timer Queue For Self-Rescheduling Event Tasks
Publication Date: 2025.12.18 ORACLE INT CORP
  • US20250383917A1 patent drawing
  • US20250383917A1 patent drawing
  • US20250383917A1 patent drawing

AI summary

Techniques for implementing a timer queue for self-rescheduling event tasks are disclosed. In some embodiments, a method comprises the following: storing events in a queue of scheduled events, where each event comprises a corresponding task that is scheduled to be executed at a particular deadline, the events being ordered by their corresponding particular deadline; determining that a condition for rescheduling has been satisfied for a first event in the plurality of events; and responsive to the determining that the condition for rescheduling has been satisfied for the first event: removing the first event from the queue of scheduled events; refreshing the corresponding particular deadline of the first event after the first event has been removed from the queue of scheduled events; and adding the first event to a collection of rescheduled events after the corresponding particular deadline of the first event has been refreshed.