O(1) Task Scheduler Using Period Nodes and Work Queues

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing scheduling policies for computing devices, such as first-come first-served and round-robin, often result in long wait times and inefficient prioritization of tasks, leading to complex heuristics and potential memory corruption issues.

Innovation Solution

Implementing a scheduling system using period nodes and work queues, where tasks are ordered by execution frequency, allowing for O(1) prioritization and scheduling, and minimizing memory allocations by resetting work queue pointers, thus avoiding complex scheduling routines and memory corruptions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If first-come first-service scheduling policy is implemented, then task execution order is simple and predictable, but wait time increases significantly when early tasks take long to execute

Engineering Contradiction:
Improvescheduling policy simplicityVSAvoidtask wait time
Core Design Contradiction:
Ease of operationVSLoss of time

Solution Approach 1:

The patent segments tasks into periodic tasks with defined execution frequencies and organizes them into separate work queues based on their period characteristics. This segmentation allows the system to handle different task types differently, enabling O(1) scheduling for periodic tasks while maintaining fairness, thus resolving the contradiction between simple scheduling and reduced wait time.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces execution frequency as a key parameter for task scheduling and uses it to determine task priority and queue placement. By changing the scheduling parameter from simple arrival time to execution frequency, the system achieves both simplicity and efficiency, reducing wait times while maintaining predictable execution order.

Inventive Principle:
Principle #35Parameter changes

2Productivity

If complex scheduling heuristics are implemented to prioritize work threads, then task prioritization improves, but system complexity and memory corruption risks increase

Engineering Contradiction:
Improvetask prioritization efficiencyVSAvoidscheduling system complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent divides the scheduling system into distinct periodic work queues, each managed independently with simple FIFO ordering. This segmentation eliminates the need for complex priority arbitration within queues, reducing system complexity while maintaining productivity through the periodic queue selection mechanism.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent uses lightweight periodic task descriptors that can be quickly created and destroyed, avoiding complex data structures. Each periodic task is represented by simple parameters (frequency, queue reference) that enable O(1) operations, reducing memory overhead and corruption risks while maintaining efficient prioritization.

Inventive Principle:
Principle #27Cheap short-living objects (Disposable)

Data Source

PatentUS9477521B2Method and system for scheduling repetitive tasks in O(1)
Publication Date: 2016.10.25 NETAPP INC
  • US9477521B2 patent drawing
  • US9477521B2 patent drawing
  • US9477521B2 patent drawing

AI summary

Systems and methods are disclosed for scheduling a plurality of tasks for execution on one or more processors. An example method includes obtaining a counter value of a counter. The method also includes for each work queue of a plurality of work queues, identifying an execution period of the respective work queue and comparing a counter value to an execution period of the respective work queue. Each work queue includes a set of tasks and is defined by an execution period at which to run the respective set of queued tasks. The method further includes selecting, based on the comparing, a subset of the plurality of work queues. The method also includes scheduling a set of tasks of slower frequency queued in a selected work queue for execution on one or more processors before a set of tasks queued in a non-selected work queue. The work items may be scheduled in O(1) because the design inherently prioritizes the tasks based on the urgency of their completion, and may do so by resetting a work queue pointer.