Thread Scheduling via Circular Array and Rate-Based Control

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing operating systems fail to optimally schedule thread execution for both real-time and non-real-time tasks, leading to resource allocation imbalances and poor response latency, which can result in time-outs or shut downs of lesser priority tasks.

Innovation Solution

A rate-based scheduling algorithm with Quality of Service guarantees and latency control is implemented, along with a mechanism to limit CPU time allocation, providing flexible resource management and defending against denial of service attacks.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a strict priority scheme is used to guarantee service for high priority tasks, then real-time task performance is improved, but lesser priority tasks may experience time-out or shut down due to lack of CPU resources

Engineering Contradiction:
Improvereal-time task execution guaranteeVSAvoidlesser priority task execution
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The scheduling system dynamically adjusts CPU resource allocation between high priority and lesser priority tasks based on system state and task requirements, rather than using static priority assignment. The scheduler monitors task execution patterns and adapts time slice distribution to ensure both real-time task guarantees and fair resource sharing.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system changes the parameter of CPU time slice allocation from fixed priority-based assignment to a flexible rate-based mechanism with Quality of Service guarantees. This allows the scheduler to control the rate of CPU allocation to different task classes, ensuring real-time tasks receive guaranteed service while lesser priority tasks receive fair share of remaining resources.

Inventive Principle:
Principle #35Parameter changes

2Reliability

If extended resource allocation is provided to real-time tasks, then real-time task performance is improved, but no resources remain for lesser priority tasks

Engineering Contradiction:
Improvereal-time task response timeVSAvoidoverall system task completion
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The scheduler implements partial resource allocation to real-time tasks by providing guaranteed minimum CPU time slices rather than exclusive access. This partial action ensures real-time tasks receive sufficient resources for their QoS guarantees while leaving remaining CPU capacity available for lesser priority tasks, achieving both objectives simultaneously.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The CPU resource allocation mechanism serves multiple functions: it guarantees service for real-time tasks with Quality of Service contracts while simultaneously providing fair share scheduling for lesser priority tasks. The single scheduling system handles both real-time and non-real-time workloads, eliminating the need for separate resource management mechanisms.

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

3Ease of operation

If a round-robin scheduling method is used for general purpose tasks, then fair resource distribution is achieved, but response latency for hard real-time functions deteriorates

Engineering Contradiction:
Improvefair resource allocationVSAvoidreal-time task response latency
Core Design Contradiction:
Ease of operationVSLoss of time

Solution Approach 1:

The scheduling system segments tasks into different classes with distinct scheduling mechanisms: real-time tasks with Quality of Service guarantees receive priority handling with controlled latency, while general purpose tasks receive fair share round-robin scheduling. This segmentation allows each task class to be optimized independently without interfering with the other.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The scheduler dynamically determines the next task to execute based on task class, QoS requirements, and current system state rather than using a fixed round-robin sequence. Real-time tasks can be activated and executed immediately when their QoS conditions are met, while maintaining fair resource distribution to other task classes through rate-based control.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS7716668B2System and method for scheduling thread execution
Publication Date: 2010.05.11 GLOBESPANVIRATA INC
  • US7716668B2 patent drawing
  • US7716668B2 patent drawing
  • US7716668B2 patent drawing

AI summary

A circular array structure is maintained having multiple time slots, where each time slot corresponds to a timeslice during which CPU resources are allocated to a particular thread. The time slots in the circular array include a queue of threads scheduled for execution during that time slot. A pointer index and an array of threads requesting immediate CPU resource allocation are maintained. A currently executing thread is suspended, and a next time slot during which the currently executing thread should resume execution is calculated. The suspended currently executing thread is appended to the queue of threads scheduled for execution at the calculated time slot. The pointer index is undated to point to the identified next sequential non-empty time slot. Any contents of the indexed time slot is appended to the array of threads requesting immediate CPU resource allocation. The thread at the top of the array is removed and activated.