Weighted Multi-Queue Task Scheduling for Priority Contention

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing task scheduling methods fail to effectively balance the execution of tasks with different priorities, leading to resource contention and inefficient resource utilization in computer systems, particularly in database systems like LSM tree-based databases, where high-priority tasks can suspend low-priority tasks and vice versa.

Innovation Solution

Implementing a task scheduling method that uses pre-constructed task queues with scheduling weights to control the probability of selecting a target queue, ensuring tasks with different priorities are scheduled at appropriate frequencies, and utilizing a thread pool with dedicated threads for high-priority tasks to avoid resource contention.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Device complexity

If tasks with different priorities are scheduled using a single task queue, then the scheduling process is simple, but resource contention occurs and tasks with different priorities cannot be properly coordinated

Engineering Contradiction:
Improvescheduling process complexityVSAvoidtask coordination reliability
Core Design Contradiction:
Device complexityVSReliability

Solution Approach 1:

The patent divides a single task queue into multiple priority-based task queues (first task queue for high-priority tasks, second task queue for low-priority tasks). This segmentation allows independent management of tasks with different priorities, preventing resource contention while maintaining reliable task coordination.

Inventive Principle:
Principle #1Segmentation

2Reliability

If high-priority tasks are always executed first, then high-priority task execution is ensured, but low-priority tasks may be suspended for long periods

Engineering Contradiction:
Improvehigh-priority task execution guaranteeVSAvoidlow-priority task suspension time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent implements dynamic task queue selection by maintaining multiple task queues with different priorities and dynamically selecting which queue to process based on current system state. This allows the system to flexibly balance between high-priority task execution guarantees and low-priority task progress, avoiding long-term suspension.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent changes the scheduling parameter from a single FIFO queue to multiple priority-based queues with configurable weights. By adjusting the weight parameters of different task queues, the system can control the frequency and proportion of task execution from different priority levels, balancing execution guarantees with time loss prevention.

Inventive Principle:
Principle #35Parameter changes

3Reliability

If multiple task queues with different priorities are implemented, then task coordination is improved, but system complexity increases

Engineering Contradiction:
Improvetask execution coordinationVSAvoidtask queue management complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent segments the task scheduling system into multiple priority-based queues, each managing tasks of specific priority levels. This segmentation improves task coordination reliability by preventing resource contention between different priority tasks.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent designs a universal task scheduling framework that can handle multiple priority levels through a unified multi-queue structure. This multi-functional design allows the same scheduling mechanism to manage various priority levels without requiring separate complex scheduling systems for each priority, thus improving coordination while controlling overall system complexity.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS20260099353A1Task scheduling
Publication Date: 2026.04.09 BEIJING OCEANBASE TECHNOLOGY CO LTD
  • US20260099353A1 patent drawing
  • US20260099353A1 patent drawing

AI summary

One or more implementations of the present specification provide a task scheduling method and apparatus, and relate to the field of computer technologies. The method includes: determining a target task queue from a plurality of pre-constructed task queues, the plurality of pre-constructed task queues being used respectively to store tasks with different priorities, each task queue having a respective scheduling weight, and the scheduling weight being used to control a probability that the task queue is determined as the target task queue; and scheduling a target task in the target task queue to a specified thread in a thread pool, to execute the target task. In the implementations of the present specification, execution of tasks with different priorities can be properly coordinated, thereby avoiding resource contention among the tasks with different priorities in a task scheduling process.