User Mode Device Drivers Using Zero-Copy Data Transfer

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Device drivers, particularly those for high throughput and low latency devices, face challenges due to their unsafe development environments, execution in kernel mode, and inability to utilize user mode for performance optimization, leading to potential system failures and inefficiencies.

Innovation Solution

Implementing a method for developing safe, user-mode device drivers using zero-copy techniques and a hardware abstraction layer, which allows drivers to execute in user mode, supporting high throughput and low latency devices by automatically generating code from machine-readable hardware specifications and enforcing resource limitations through capability-based models and managed code.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If device drivers are implemented in kernel mode, then system control and access to hardware resources are improved, but system safety and stability deteriorate due to the risk of crashes and data corruption from defective or malicious drivers

Engineering Contradiction:
Improveaccess to hardware resourcesVSAvoidsystem safety
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The patent segments the driver execution environment from the kernel mode, allowing drivers to run in user mode while maintaining controlled access to hardware resources through the operating system's resource management mechanisms. This separation isolates potential driver failures from the kernel, preventing system-wide crashes while preserving hardware access capabilities.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary layer (the operating system's driver framework and resource management system) that mediates between user-mode drivers and kernel-mode hardware resources. This intermediary enables safe resource access by enforcing authorization rules and managing resource allocation without requiring drivers to run in privileged kernel mode.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If device drivers are implemented in user mode, then system safety is improved, but performance deteriorates due to mode switching overhead and inability to handle hardware interrupts

Engineering Contradiction:
Improvesystem safetyVSAvoidthroughput and latency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent performs preliminary actions by pre-configuring user-mode processes with the necessary permissions and resource handles before they need to access hardware. The operating system establishes authorization rules and resource mappings in advance, allowing user-mode drivers to access hardware resources directly without repeated mode transitions, thereby improving performance while maintaining safety.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent extracts the interrupt handling and hardware access capabilities from the kernel mode and makes them available to user-mode processes through specialized mechanisms. By taking out these critical functions and providing them through controlled interfaces, the system eliminates mode switching overhead while preserving the safety benefits of user-mode execution.

Inventive Principle:
Principle #2Taking out (Extraction)

3Ease of manufacture

If traditional device drivers are developed using unsafe languages like C/C++, then ease of development is improved, but reliability deteriorates due to type-safety issues and error-prone interfaces

Engineering Contradiction:
Improveease of developmentVSAvoidtype-safety
Core Design Contradiction:
Ease of manufactureVSReliability

Solution Approach 1:

The patent changes the programming language parameters from unsafe languages (C/C++) to safe languages with strong type systems (such as C# or Java). This parameter change enables the use of modern language features like garbage collection, type safety, and memory management while the operating system's driver framework provides the necessary low-level hardware access capabilities, thus improving reliability without sacrificing development ease.

Inventive Principle:
Principle #35Parameter changes

Applied Scientific Principles

This section explains which scientific principles are used to turn an abstract innovation direction into a practical engineering solution.

Function Achieved in This Case

This approach enables the development of high-performance, type-safe user-mode drivers comparable to legacy kernel mode drivers, enhancing system safety and reliability while reducing development errors and complexities.

Implementation Method 1

delivering the hardware message to one or more driver processes executing in user mode using a zero-copy to allow the one or more driver processes to support high throughput and low latency hardware devices

Methodology Applied
Scientific EffectZero-copy:

Data Source

PatentEP2941695B1High throughput low latency user mode drivers implemented in managed code
Publication Date: 2019.06.12 MICROSOFT TECHNOLOGY LICENSING LLC
  • EP2941695B1 patent drawingFigure 1
  • EP2941695B1 patent drawingFigure 2
  • EP2941695B1 patent drawingFigure 3

AI summary

Implementing a safe driver that can support high throughput and low latency devices. The method includes receiving a hardware message from a hardware device. The method further includes delivering the hardware message to one or more driver processes executing in user mode using a zero-copy to allow the one or more driver processes to support high throughput and low latency hardware devices.