user mode driver framework introduction and overview l.
Skip this Video
Loading SlideShow in 5 Seconds..
User-Mode Driver Framework: Introduction And Overview PowerPoint Presentation
Download Presentation
User-Mode Driver Framework: Introduction And Overview

Loading in 2 Seconds...

play fullscreen
1 / 28

User-Mode Driver Framework: Introduction And Overview - PowerPoint PPT Presentation

  • Uploaded on

User-Mode Driver Framework: Introduction And Overview. Jeffrey Copeland Program Manager Windows Device Experience Group Microsoft Corporation. Introduction. What this talk covers Overview Future directions Intended audience Other sessions of interest Following talk on UMDF architecture

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'User-Mode Driver Framework: Introduction And Overview' - tamar

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
user mode driver framework introduction and overview

User-Mode Driver Framework: Introduction And Overview

Jeffrey CopelandProgram ManagerWindows Device Experience GroupMicrosoft Corporation

  • What this talk covers
    • Overview
    • Future directions
  • Intended audience
  • Other sessions of interest
    • Following talk on UMDF architecture
    • Tomorrow’s UMDF lab session and Q&A
why user mode
Why User Mode?
  • High-quality drivers are difficult to write
    • Crash statistics prove this
  • User mode drivers are “safer”
  • Some Windows driver models already live in user space
    • Printers, audio, imaging
  • UMDF is the general purpose user space model
a quick word about wdf
A Quick Word About WDF
  • Windows Driver Foundation is the successor to WDM
    • WDM is deprecated
    • New Kernel Mode and User Mode driver frameworks – KMDF and UMDF
  • These fit into the driver life cycle
    • Driver kit
    • Test tools
    • Installation tools
how to expose a device
How To Expose A Device
  • You can use a stand-alone application with a DLL to directly access the device
    • Non-shared device
  • You can write a service to share the device
  • You can write a driver to use normal I/O
    • Not WDM – Old technology
    • UMDF?
    • KMDF?
umdf versus kmdf
UMDF versus KMDF
  • When to use UMDF
    • Protocol buses – USB, 1394, IP
    • Software-only drivers – Filters, virtual ports
  • You must use KMDF if you need
    • More stringent timing requirements
    • Hardware access – DMA, interrupts
    • Kernel-mode clients or access to kernel data
  • Hybrid-model drivers
where can you use umdf
Where Can You Use UMDF?
  • Today
    • Device classes:
      • Cell phones, media players, cameras, other portable devices
      • RFID, NFC
      • Biometric and other security devices
      • Devices which currently are accessed directly through applications or services
    • Buses:
      • USB – through WinUSB I/O Target
      • IP – sockets through WinSock
      • Bluetooth – RFCOMM or WinSock
      • Any bus that provides user-mode access
where can you use umdf9
Where Can You Use UMDF?
  • Factors to consider today
    • Can the device use a UMDF class driver?
    • Can the driver access device over that bus?
    • Does the kernel need to access the device?
  • Future
    • Working with device teams to drive availability
    • Need Feedback to help set priorities
umdf developers
UMDF Developers
  • Existing driver developers
    • Who want to move drivers to user space
    • Who already have the “driver mindset”
  • New driver developers
    • Coming from application development
    • Who need to provide device support
    • Who are learning new skills
  • Anyone who wants to
    • Build a driver without a lot of development overhead
    • Reduce the risks associated with traditional drivers
    • Stop causing blue screens
umdf developers11
UMDF Developers
  • UMDF developers come from two directions
  • The application programmer still needsto understand something about low-level system facilities

Application Programmers


umdf structure
UMDF Structure
  • UMDF driver
    • Framework loads driver
    • Driver then creates structure andspecifies callbacks and event handlers
    • C++ and “COM-lite”
  • For more details stay for the UMDF technical talk
umdf structure13



UM driver

UM driver

UMDF Structure

Driver Manager

Device Stack

Host Process





Kernel Driver


Kernel Driver

  • Test system: hyper-threaded 3.2Ghz P4, 1GB
    • Performance sample available
  • Null driver
    • Raw throughput up to 4 gigabits/sec
    • Buffer size “sweet spot” 64-128 Kb
  • Win32 I/O target – USB hard drive
    • Throughput 170 megabits/sec
    • CPU usage 11%
  • UMDF can easily saturate a USB 2.0bus’s maximum speed of 480 megabits/sec
    • No adverse performance impact in existing UMDF drivers
why to use umdf
Why To Use UMDF
  • Single WDF model – Both KM and UM
  • Quicker development time
    • PnP/Power boilerplate is encapsulated
    • Debugging in user mode is easier!
    • Crashes in testing don’t force a reboot
  • Access to user-mode services
  • Shallow learning curve for application developers
why to use umdf16
Why To Use UMDF
  • Improved stability
    • UM drivers are isolated from each other
    • Kernel is isolated from UM drivers
    • A step toward general driver isolation
  • Increased security
    • Compromised driver can’t crash the system
    • But may still compromise device data
  • Recoverability
    • Driver can recover or be restarted aftera crash without a blue screen
why to use umdf17
Why To Use UMDF
  • “Writing a UMDF driver is relatively easy once you get your hands around using COM-lite.  Perhaps best of all, when your driver crashes while you're debugging it, the system stays running.” – Mark Cariddi, OSR – The NT Insider
  • “Plug-and-play and power management are easier to use. Queues and I/O targets are straight-forward, and they have what I needed already.” – Janet Schneider, Microsoft Storage Team
why to use umdf18
Why To Use UMDF
  • “UMDF allows me to focus on the functional implementation, rather than the intricaciesof driver development. The best part about UMDF drivers is that a crash doesn't causea blue screen.”– Dan Polivy, Microsoft SideShow developer
smart card as a case study
Smart Card As A Case Study
  • Rewrite of an existing WDM driver
    • Developer had driver knowledge,but not WDM or WDF experience
    • 2 months to come up to speed onWDF and the existing driver
    • 1½ months to re-implement thedriver in UMDF
smart card as a case study20
Smart Card As A Case Study
  • 35% code reduction – measured in source bytes
    • 4000 lines of PnP code removed
  • Functionally identical driver with less code, higher robustness, more maintainability
    • Code now “feels simpler”
  • Results are similar to experience porting WDM network and modem drivers to KMDF
smart card

Smart Card

Janet Schneider

Storage Driver developer




Dan Polivy

Mobile PC developer


umdf availability
UMDF Availability
  • Beta UMDF available
    • For Windows Vista now
    • For Windows XP next week
    • As update to the Beta 2 Windows Driver Kit
  • Available for Windows Server 2003 at same time as release for Windows Server codenamed "Longhorn"
umdf in the future
UMDF In The Future
  • New driver models will move to WDF
  • New features in UMDF
    • We’re in post-Windows Vista planning now
    • We need your feedback
    • Help us decide
  • Possible convergence on OS platforms
    • Windows Mobile
  • Join the WDF Beta Program

    • Sign in with your Microsoft Passport, and join the WDK/WDF beta
  • Participate in the UMDF newsgroup

  • WHDC web site
  • DevCon 2005 presentations

  • Join us for the UMDF lab and Q&A Wednesday
      • Lab requires a Design Preview Agreement
  • Ask the Experts Tuesday evening
call to action
Call To Action
  • Install the Windows Driver Kit
  • Try UMDF for your driver projects
  • Send us feedback!
    • We want to know how to make the framework better
    • We want to know what features are still missing
    • Respond to our survey



© 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.