Asynchronous Callback Queuing for MPI Thread Context

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing Message Passing Interface (MPI) approaches lack suitable support for callback-driven completion notifications and efficient handling of non-blocking request completions, leading to indeterminate execution contexts and potential performance regressions in multi-threaded applications.

Innovation Solution

The introduction of asynchronous callback enhancements, such as MSMPI_Isend_apc and MSMPI_Irecv_apc, which allow non-blocking send and receive operations with deterministic thread contexts, and interruptible wait enhancements, like MSMPI_Waitsome_interruptible, along with synchronization functions MSMPI_Queuelock_acquire and MSMPI_Queuelock_release, to manage thread safety and avoid deadlocks.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional MPI callback mechanisms are used, then completion notifications can be provided, but the execution context becomes indeterminate and performance regresses

Engineering Contradiction:
Improvedeterministic execution contextVSAvoidperformance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent introduces an intermediary callback queuing mechanism that sits between the completion detection and callback execution. When a non-blocking request completes, the callback is queued in the requesting thread's context rather than executing immediately in an indeterminate context. This intermediary queue ensures deterministic execution context while maintaining performance by avoiding unnecessary thread switches.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Ease of operation

If blocking waits are used for message passing, then thread synchronization is simplified, but application responsiveness and throughput decrease

Engineering Contradiction:
Improvethread synchronizationVSAvoidapplication responsiveness
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The patent applies preliminary action by having threads transition to an alertable state before performing blocking I/O operations. This allows the system to pre-configure the thread for receiving asynchronous procedure calls, enabling non-blocking message passing with automatic callback notification when operations complete, thus maintaining responsiveness while simplifying synchronization.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces dynamic state transitions for threads, allowing them to switch between alertable and non-alertable states. This dynamic behavior enables threads to be responsive to asynchronous callbacks when needed while maintaining simple blocking semantics when appropriate, balancing ease of operation with application responsiveness.

Inventive Principle:
Principle #15Dynamics

3Productivity

If internal MPI threads are used for progress, then message passing operations can proceed, but system complexity and overhead increase

Engineering Contradiction:
Improvemessage passing throughputVSAvoidsystem complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent implements self-service by enabling user-mode threads to make progress on their own message passing operations without requiring internal MPI threads. Threads can perform blocking I/O in user mode and automatically receive completion notifications via asynchronous procedure calls, eliminating the need for complex internal thread management while maintaining throughput.

Inventive Principle:
Principle #25Self-service

4Adaptability or versatility

If asynchronous callbacks are implemented without thread context control, then non-blocking operations are supported, but execution determinism is lost

Engineering Contradiction:
Improvenon-blocking operation supportVSAvoidexecution determinism
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent applies local quality by associating each thread with its own callback queue and controlling callback execution locally within that thread's context. This ensures that callbacks execute deterministically in the requesting thread rather than in indeterminate system contexts, maintaining execution determinism while supporting non-blocking operations.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS9043796B2Asynchronous callback driven messaging request completion notification
Publication Date: 2015.05.26 MICROSOFT TECHNOLOGY LICENSING LLC
  • US9043796B2 patent drawing
  • US9043796B2 patent drawing
  • US9043796B2 patent drawing

AI summary

Through an asynchronous callback enhancement, a thread makes a non-blocking request (e.g., send, receive, I/O) to a message passing interface library, and a callback routine is associated with the request as an asynchronous callback to the thread. The callback is queued for execution in the requesting thread and so has a deterministic execution context. Callback queuing may occur in response to another thread detecting that the request is complete. Further control over callback execution is provided by state transitions which determine whether the thread is open to processing (e.g., executing) an asynchronous callback. Callback association is done by a broad or by narrow association routines. An application which has processes organized in ranks, each including a communication thread with associated callback(s), and multiple worker threads. Interruptible wait enhancements may also be present.