Scheduler Context Switching Overhead Reduction

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The process of switching execution contexts in a computer system is time-consuming and results in significant overhead, preventing other tasks from being executed while the state is being saved.

Innovation Solution

A scheduler minimizes context switching by detecting tasks that have not been previously invoked and executing them without performing a context switch if the previous task completed, storing the original execution context for later use.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Duration of action of moving object

If the scheduler performs context switching to execute a new task, then task execution continuity is improved, but system overhead increases and productivity decreases

Engineering Contradiction:
Improvetask execution continuityVSAvoidsystem throughput
Core Design Contradiction:
Duration of action of moving objectVSProductivity

Solution Approach 1:

The scheduler performs preliminary actions by detecting tasks that have not been previously invoked and preparing them for execution. When the processing resource becomes available after completing a previous task, the scheduler proactively identifies and transitions these dormant tasks into active execution without requiring full context switching, thereby maintaining execution continuity while reducing overhead.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

Instead of the conventional approach where context switching is performed whenever a task needs to execute, this patent inverts the logic by executing tasks without context switching when possible. The scheduler checks whether a task has been previously invoked and, if not, executes it directly on the available processing resource without the overhead of saving and restoring execution contexts, thus improving productivity.

Inventive Principle:
Principle #13The other way round (Inversion)

2Reliability

If the scheduler performs context switching to save execution context state, then task state preservation is improved, but execution time is increased

Engineering Contradiction:
Improvetask state preservationVSAvoidcontext switching time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The scheduler applies partial context switching only when necessary. Instead of performing full context switching for every task transition, it selectively executes tasks without context switching when they have not been previously invoked and the processing resource is available. This partial approach preserves task state reliability for cases that need it while minimizing the time loss associated with context switching.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The scheduler maintains a copy of task state information in its data structure without performing actual context switching. By tracking which tasks have been previously invoked and their associated execution contexts, the scheduler can reconstruct or restore task state when needed without the overhead of saving and restoring full execution contexts, thus preserving reliability while reducing time loss.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS8806180B2Task execution and context switching in a scheduler
Publication Date: 2014.08.12 MICROSOFT TECHNOLOGY LICENSING LLC
  • US8806180B2 patent drawing
  • US8806180B2 patent drawing
  • US8806180B2 patent drawing

AI summary

A scheduler in a process of a computer system detects a task with an associated execution context that has not been previously invoked by the scheduler. The scheduler executes the task on a processing resource without performing a context switch if the processing resource executed a previous task to completion. The scheduler stores the execution context originally associated with the task for later use.