Time-Based Priority Queue Lock-Free Scheduling

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing time prioritized task scheduling systems face inefficiencies due to high overhead from locking procedures and potential starvation of low-priority tasks, especially in multi-core CPU environments with parallel thread operations, where tasks have time-dependent deadlines and priorities that need to be dynamically updated.

Innovation Solution

A Time-Based Priority Queue (TBPQ) system that uses parallel atomic operations to manage computational tasks across bins with time-based priorities, ensuring tasks are allocated and processed without locking, preventing starvation by maintaining a fixed ascending order of priorities through a round-robin scheme and employing hardware-supported operations for efficient task allocation and extraction.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If locking procedures are used for synchronization in multi-core CPU environments, then thread safety is ensured, but system overhead increases significantly

Engineering Contradiction:
Improvethread safetyVSAvoidsystem overhead
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent extracts the synchronization mechanism from traditional locking procedures and replaces it with atomic hardware operations. By removing the need for locks and critical sections, the system maintains thread safety without the associated overhead of locking procedures, directly resolving the contradiction between reliability and device complexity.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent substitutes the mechanical locking system with hardware-supported atomic operations. Instead of using software-based locks that require context switching and memory barriers, the system uses atomic read-modify-write operations provided by modern CPUs, eliminating the overhead while preserving thread safety guarantees.

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

2Device complexity

If traditional queueing datasets are used, then task management is simple, but time-based priority updates are not performed automatically

Engineering Contradiction:
Improvetask management simplicityVSAvoidtime-based priority updating
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The patent introduces dynamic time-based priority assignment where task priorities automatically update based on their deadlines. The system uses the formula priority = ceil(63 * (deadline - currentTime) / tickRange) to dynamically adjust priorities, ensuring that tasks closer to their deadlines receive higher priority without requiring manual intervention or complex scheduling logic.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent implements periodic priority updates synchronized with system ticks. The scheduler operates in periodic intervals, evaluating task priorities at each tick and redistributing tasks to appropriate priority queues. This periodic action ensures time-based priorities are maintained without continuous processing overhead.

Inventive Principle:
Principle #19Periodic action

3Productivity

If multiple threads operate in parallel on shared datasets, then processing throughput increases, but synchronization overhead increases

Engineering Contradiction:
Improveprocessing throughputVSAvoidsynchronization overhead
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent implements a lock-free data structure where each thread independently manages its own task queue operations using atomic operations. Threads self-service by performing compare-and-swap operations to add and remove tasks without requiring external synchronization, eliminating synchronization overhead while maintaining parallel processing throughput.

Inventive Principle:
Principle #25Self-service

4Device complexity

If FIFO queue is used, then implementation is simple, but time-based priority updates are not performed

Engineering Contradiction:
Improvequeue implementation simplicityVSAvoidtime-based priority adaptability
Core Design Contradiction:
Device complexityVSAdaptability or versatility

Solution Approach 1:

The patent segments the single FIFO queue into multiple priority-based queues organized in a tree structure. Each node in the tree represents a priority level, and tasks are distributed across these segments based on their time-based priorities. This segmentation maintains simple queue operations within each segment while enabling sophisticated time-based priority management across the entire system.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS11461132B2Time based priority queue
Publication Date: 2022.10.04 HUAWEI TECH CO LTD
  • US11461132B2 patent drawing
  • US11461132B2 patent drawing
  • US11461132B2 patent drawing

AI summary

A system for managing computational tasks in a queuing dataset includes at least one processor and a scheduler executed by the at least one processor. The scheduler is configured to simultaneously and circularly change an association of each of a plurality of computational task bins with a respective one of a plurality of time based priorities ordered in a fixed ascending order; receive a plurality of computational tasks; and allocate each of the plurality of computational tasks to one of the plurality of computational task bins according to a respective time constraint of the respective computational task and a current association of the plurality of computational task bins with the plurality of time based priorities. The scheduler is further configured to empty the computational task bin currently associated with the highest time based priority by sequentially outputting the computational tasks thereof.