UDI, a Uniform Driver Interface Architecture Overview Kurt Gollhardt (Chair, Project UDI) November 2010.

Slides:



Advertisements
Similar presentations
CS-334: Computer Architecture
Advertisements

Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
UDI, a Uniform Driver Interface By Project UDI Kevin Quick, Interphase, Chairman Mark Evenson, HP, Vice-Chairman Kurt Gollhardt, SCO, Editor.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem.
Page 1 Processes and Threads Chapter Processes 2.2 Threads 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling.
I/O Hardware n Incredible variety of I/O devices n Common concepts: – Port – connection point to the computer – Bus (daisy chain or shared direct access)
04/16/2010CSCI 315 Operating Systems Design1 I/O Systems Notice: The slides for this lecture have been largely based on those accompanying an earlier edition.
I/O Systems CS 3100 I/O Hardware1. I/O Hardware Incredible variety of I/O devices Common concepts ◦Port ◦Bus (daisy chain or shared direct access) ◦Controller.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Dolphin software SCI Software Replace in Title/Slide Master with Company Logo or delete Hugo Kohmann Dolphin Interconnect Solutions.
1 I/O Management in Representative Operating Systems.
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
I/O Systems CSCI 444/544 Operating Systems Fall 2008.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
I/O Tanenbaum, ch. 5 p. 329 – 427 Silberschatz, ch. 13 p
Introduction to UDI Kurt Gollhardt SCO Core OS Architect
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
1 Input/Output. 2 Principles of I/O Hardware Some typical device, network, and data base rates.
Chapter 10: Input / Output Devices Dr Mohamed Menacer Taibah University
Silberschatz, Galvin and Gagne ©2011Operating System Concepts Essentials – 8 th Edition Chapter 4: Threads.
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
Chapter 13: I/O Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 2, 2005 Chapter 13: I/O Systems I/O Hardware.
I/O Systems I/O Hardware Application I/O Interface
1 Lecture 20: I/O n I/O hardware n I/O structure n communication with controllers n device interrupts n device drivers n streams.
1-1 Embedded Network Interface (ENI) API Concepts Shared RAM vs. FIFO modes ENI API’s.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Computer Architecture Lecture10: Input/output devices Piotr Bilski.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
2009 Sep 10SYSC Dept. Systems and Computer Engineering, Carleton University F09. SYSC2001-Ch7.ppt 1 Chapter 7 Input/Output 7.1 External Devices 7.2.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Chapter 13: I/O Systems. 13.2/34 Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware.
UDI Tutorial & Driver Walk-Through Part 1 Kurt Gollhardt SCO Core OS Architect
UDI HDK Roadmap Matt Kaufman Senior Software Engineer
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem.
Chapter 13: I/O Systems Silberschatz, Galvin and Gagne ©2005 Operating System Principles Chapter 13: I/O Systems I/O Hardware Application I/O Interface.
Chapter 13 – I/O Systems (Pgs ). Devices  Two conflicting properties A. Growing uniformity in interfaces (both h/w and s/w): e.g., USB, TWAIN.
UDI Advanced Topics DMA and Interrupts Robert Lipe UDI Development Team Lead
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower than CPU.
Chapter 13: I/O Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 13: I/O Systems Overview I/O Hardware Application.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 12: I/O Systems I/O hardwared Application I/O Interface Kernel I/O.
UDI Technology Benefits Slide 1 Uniform Driver Interface UDI Technology Benefits.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
ECE 456 Computer Architecture Lecture #9 – Input/Output Instructor: Dr. Honggang Wang Fall 2013.
UDI Architecture In-Depth Robert Lipe UDI Development Team Lead
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Processes and Threads Chapter 3 and 4 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Introduction to Operating Systems Concepts
Chapter 13: I/O Systems.
Operating System & Application Software
Module 12: I/O Systems I/O hardware Application I/O Interface
Chapter 13: I/O Systems Modified by Dr. Neerja Mhaskar for CS 3SH3.
CSCI 315 Operating Systems Design
Chapter 4: Threads.
I/O Systems I/O Hardware Application I/O Interface
Operating System Concepts
CS703 - Advanced Operating Systems
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Outline Operating System Organization Operating System Examples
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Chapter 13: I/O Systems.
Module 12: I/O Systems I/O hardwared Application I/O Interface
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

UDI, a Uniform Driver Interface Architecture Overview Kurt Gollhardt (Chair, Project UDI) November 2010

Uniform Driver Interface Project UDI - Slide 2 Copyright 2010 Kurt Gollhardt What is UDI? OS-Neutral Platform-Neutral Device Driver Interface

Uniform Driver Interface Project UDI - Slide 3 Copyright 2010 Kurt Gollhardt UDI Driver Portability 100% Driver Source Portability –Defines architecture, APIs and packaging format Binary Portability (where applicable) –IA-32 and IA-64 ABIs defined (Recent work on AMD64, ARM in 2010) Source and Binary Distributions

Uniform Driver Interface Project UDI - Slide 4 Copyright 2010 Kurt Gollhardt The “Driver Problem” One Device, Many Operating Systems Requires Many Drivers for One Device –Who writes all these drivers? »Device Manufacturer (IHV)? OS Vendor (OSV)? 3 rd -Party Contractor or Systems Integrator? »Business decisions or personal priorities mean that some combinations get left out. –Less popular OSes get fewer drivers »(Everybody but Microsoft )

Uniform Driver Interface Project UDI - Slide 5 Copyright 2010 Kurt Gollhardt The UDI Solution One driver source for all UDI-compliant OSes UDI moves up IHV porting order –More bang for the buck for IHVs UDI-compliant OSes get better coverage (once critical mass reached)

Uniform Driver Interface Project UDI - Slide 6 Copyright 2010 Kurt Gollhardt UDI In Action First Prototype Completed 12/9/1997 Tru64 UNIX 64 bit Alpha SCO Unixware 32 bit Intel SUN Solaris 32 bit UltraSparc HP-UX 32 bit PA_RISC IBM AIX PowerPC NCR MP-RAS 32 bit Intel Adapters Adaptec SCSI Interphase 100BT Gigabit NIC Adapters Adaptec SCSI Interphase 100BT Gigabit NIC

Uniform Driver Interface Project UDI - Slide 7 Copyright 2010 Kurt Gollhardt The Versioning Problem OS Driver APIs Change Over Time Driver and OS Development Cycles Unnecessarily Linked –IHV should change driver as H/W evolves –OSV should be able to evolve OS w/o waiting for new drivers

Uniform Driver Interface Project UDI - Slide 8 Copyright 2010 Kurt Gollhardt UDI Versioning Stable API –Strict separation of responsibilities –Eliminate cross-cutting concerns Link-Level Versioning –Enables support for multiple versions simultaneously, even at binary level

Uniform Driver Interface Project UDI - Slide 9 Copyright 2010 Kurt Gollhardt Uniformity Across Device Types Reduces Learning Curve Common Execution Model Common Data Model Common Inter-Module Communication Mechanism Common System Services

Uniform Driver Interface Project UDI - Slide 10 Copyright 2010 Kurt Gollhardt UDI: Next-Generation Technology Instance Independence –Hot plug/hot swap adapters and devices Location Independence –Distributed environments and I/O processors

Uniform Driver Interface Project UDI - Slide 11 Copyright 2010 Kurt Gollhardt UDI: Next-Generation Technology (continued) Implicit Synchronization –Thread-safe drivers W/O locking calls –High parallelism between driver instances Support for Field-Installable 3rd-Party Extensions –Add new device classes w/o OS updates

Uniform Driver Interface Project UDI - Slide 12 Copyright 2010 Kurt Gollhardt UDI as Technology Enabler UDI simplifies support for: –Future platforms (new CPU & I/O bus architectures) –Mixed-endian platforms & arbitrary bus hierarchies –User-mode drivers –Advanced driver debugging tools –Fault recovery and validation environments None of these require driver changes!

Uniform Driver Interface Project UDI - Slide 13 Copyright 2010 Kurt Gollhardt Free and Open Specification Published on the Web (1999 & 2001) No Licensing Fees Developed Jointly by a Multi-Company Team of OS Architects and Driver Writers

Uniform Driver Interface Project UDI - Slide 14 Copyright 2010 Kurt Gollhardt Primary Participants (thru 2002)

Uniform Driver Interface Project UDI - Slide 15 Copyright 2010 Kurt Gollhardt UDI Architecture Driver Encapsulation

Uniform Driver Interface Project UDI - Slide 16 Copyright 2010 Kurt Gollhardt UDI Fully Encapsulates Drivers UDI Drivers Physical I/O Abstraction System Services: Configuration Resource Allocation Inter-Module Communication Tracing & Logging Error Handling Time Management Buffer Management Operating System UDI Environment Application Programs CPU and I/O Hardware (PIO, DMA, Interrupts) I/O Requests

Uniform Driver Interface Project UDI - Slide 17 Copyright 2010 Kurt Gollhardt UDI System Services System interface & resource management –Implemented for all UDI environments –Abstract OS services Calls from driver to environment services are called service calls

Uniform Driver Interface Project UDI - Slide 18 Copyright 2010 Kurt Gollhardt Embedding OS UDI Environment Path From Application to Driver Integrated Implementation I/O Subsystem Application UDI Driver Physical I/O Adapter or System Hardware OS Requests UDI Channel Operations Interrupts UDI Services Hardware Access

Uniform Driver Interface Project UDI - Slide 19 Copyright 2010 Kurt Gollhardt Embedding OS UDI Environment Path From Application to Driver Layered Implementation OS-to-UDI External Mapper I/O Subsystem Application UDI Driver Physical I/O Adapter or System Hardware OS Requests Native Driver Interface UDI Channel Operations Interrupts UDI Services Hardware Access

Uniform Driver Interface Project UDI - Slide 20 Copyright 2010 Kurt Gollhardt Monitor Keyboard Example Driver Hierarchy Monitor External Mapper Keyboard External Mapper Monitor Driver Instance Keyboard Driver Instance Disk Driver Instance Disk Driver Instance Tape Driver Instance Base I/O Adapter Driver Instance Disk External Mapper Tape External Mapper SCSI Adapter Driver Instance I/O Bus Adapter Driver Instance PROCESSOR-MEMORY INTERCONNECT I/O Bus Adapter Base I/O AdapterSCSI Adapter Disk Tape UDI Environment Embedding OS I/O SOFTWARE I/O HARDWARE Child Parent

Uniform Driver Interface Project UDI - Slide 21 Copyright 2010 Kurt Gollhardt UDI Architecture Execution Model

Uniform Driver Interface Project UDI - Slide 22 Copyright 2010 Kurt Gollhardt UDI Regions Basic unit for execution and scheduling –Each call into the driver region is serialized No direct data sharing between regions –You have to go through channels Region attributes (e.g. priority hints) specified at build time

Uniform Driver Interface Project UDI - Slide 23 Copyright 2010 Kurt Gollhardt UDI Regions (continued) One driver instance per device instance One or more regions per driver instance –Multi-region drivers may have higher parallelism Enables instance-independence –Driver state separate for each device instance Enables location-independence –Each region may operate in a different domain »e.g. address space, NUMA or network node

Uniform Driver Interface Project UDI - Slide 24 Copyright 2010 Kurt Gollhardt Regions and Channels Region A (driver or environment) communication channel channel endpoints Region B (driver or environment) Region Data

Uniform Driver Interface Project UDI - Slide 25 Copyright 2010 Kurt Gollhardt UDI Service Calls Two Styles Synchronous service calls –Complete without blocking –Results returned “immediately” Asynchronous service calls –Return without blocking –Delayed completion –Results returned via callback function

Uniform Driver Interface Project UDI - Slide 26 Copyright 2010 Kurt Gollhardt Non-Blocking Execution Model All service calls and channel operations return without blocking Drivers usually return after making one service call or channel operation call Gives environment complete control over thread usage and driver scheduling Sequence of call chains between callbacks can be viewed as a “Pseudo-Thread”

Uniform Driver Interface Project UDI - Slide 27 Copyright 2010 Kurt Gollhardt UDI Architecture Inter-Module Communication

Uniform Driver Interface Project UDI - Slide 28 Copyright 2010 Kurt Gollhardt UDI Channels Basis for Inter-Module Communication (IMC) Bi-directional channels connect regions Communication via channel operations –Strongly typed function-call interface –Paired asynchronous one-way operations »Each request has a corresponding response »Context managed via control blocks

Uniform Driver Interface Project UDI - Slide 29 Copyright 2010 Kurt Gollhardt channel context UDI Channel Communications Region A channel handle communication channel channel endpoints Region B channel ops vector Channel Operation entry point region data control block

Uniform Driver Interface Project UDI - Slide 30 Copyright 2010 Kurt Gollhardt UDI Architecture Data Model

Uniform Driver Interface Project UDI - Slide 31 Copyright 2010 Kurt Gollhardt UDI Data Model Context managed via control blocks –Used with channel ops & async service calls –Environment uses CB to hold service call state –Driver uses context pointer in CB to find its data No memory shared between regions –Memory allocated in a region is private to that region –Regions share data by using channel operations

Uniform Driver Interface Project UDI - Slide 32 Copyright 2010 Kurt Gollhardt UDI Control Blocks CB contains scratch and context pointers (preserved across service calls, not ops) »Scratch space in CB holds per-request state »Context pointer lets driver find the context of a channel op or callback Initially set to channel context Channel context struct points to global data All CBs can be cast to generic udi_cb_t

Uniform Driver Interface Project UDI - Slide 33 Copyright 2010 Kurt Gollhardt Implicit Synchronization No locking primitives required in UDI –All data accesses implicitly synchronized »Region data accessible only from that region »Only one thread per region active at a time Other calls deferred until active call returns –Typically by adding CB to a region queue –Driver controls its parallelism by picking number and type of regions

Uniform Driver Interface Project UDI - Slide 34 Copyright 2010 Kurt Gollhardt More Information on UDI Project UDI Website Reference Implementation

Uniform Driver Interface Project UDI - Slide 35 Copyright 2010 Kurt Gollhardt UDI Specifications Now Available UDI 1.01 Specifications at project-udi.org –UDI Core Specification (2 volumes) –UDI Physical I/O Specification –UDI PCI Bus Binding Specification –UDI System Bus Binding Specification –UDI SCSI Driver Specification –UDI Network Driver Specification –UDI IA-32/IA-64 ABI Binding Specification

Uniform Driver Interface Project UDI - Slide 36 Copyright 2010 Kurt Gollhardt Informative Documents Introductory Info –UDI FAQ & Data Sheet –UDI Management & Technical Overviews –UDI Advantages & Opportunities Other Materials –Various Presentations & Tutorials –UDI Environment Implementer’s Guide

Uniform Driver Interface Project UDI - Slide 37 Copyright 2010 Kurt Gollhardt Reference Implementation Sample drivers & metalanguage libraries Sample OS implementations, including: –Linux*, UnixWare*, OpenServer*, Solaris* (partial) –Easily portable to other OSes User-mode test environments (no PIO) for: –Linux, UnixWare, Solaris, FreeBSD, Mac OS X Jointly developed by Project UDI members BSD-style Open Source License

Uniform Driver Interface Project UDI - Slide 38 Copyright 2010 Kurt Gollhardt Intel Moves Closer to Unix in Standards Effort - Information Week Intel Pushing Unified Unix - InfoWorld/C-Net Intel, Computer Makers to Forge Common Guidelines for Unix - Wall Street Journal Heavyweights Unite Behind Interface for Unix Servers - PC Week Uniform Driver Interface Spells Relief - EE Times UDI News Headlines (1999)

Uniform Driver Interface Project UDI - Slide 39 Copyright 2010 Kurt Gollhardt UDI Architecture More Details & Examples

Uniform Driver Interface Project UDI - Slide 40 Copyright 2010 Kurt Gollhardt UDI Metalanguages Device-type specific communication for a particular device class Defines communication paradigm between cooperating modules –Operations and sequences to implement technology-specific functionality Analogous to SCSI CAM, DLPI, etc.

Uniform Driver Interface Project UDI - Slide 41 Copyright 2010 Kurt Gollhardt Metalanguages and Channels Metalanguages define: –Number and types of channels –Legal “channel operation” types for each channel type »Control block plus meta-specific parameters –Structure of control block for each operation type »Meta-specific “subclasses” of generic udi_cb_t »Implemented in C by using udi_cb_t as first member of each udi_xxx_cb_t structure

Uniform Driver Interface Project UDI - Slide 42 Copyright 2010 Kurt Gollhardt UDI Execution Model Driver’s udi_init_info structure contains entry- point pointers, size requirements, etc. No other global entry points –Avoids possible name collisions –No need to wrap driver with generated entry tables All driver code executed in context of a region –Regions are associated with driver instances »At least one region for each adapter/device controlled

Uniform Driver Interface Project UDI - Slide 43 Copyright 2010 Kurt Gollhardt Fundamental Data Types Specific-length types –udi_ubit8_t, udi_sbit8_t, udi_ubit16_t, udi_sbit16_t, udi_ubit32_t, udi_sbit32_t –udi_boolean_t (udi_ubit8_t) Abstract types –udi_size_t, udi_index_t

Uniform Driver Interface Project UDI - Slide 44 Copyright 2010 Kurt Gollhardt Fundamental Data Types (continued) Opaque types –Contain environment-private fields and structure –Must be allocated using UDI service calls –Opaque handles »udi_channel_t, udi_constraints_t Semi-opaque types –udi_cb_t *, udi_buf_t *

Uniform Driver Interface Project UDI - Slide 45 Copyright 2010 Kurt Gollhardt Core Services Inter-Module Communication (IMC) Memory Management Buffer Management Time Management Tracing and Logging

Uniform Driver Interface Project UDI - Slide 46 Copyright 2010 Kurt Gollhardt Core Utility Functions String/Memory Utilities –udi_strcpy, udi_strlen, udi_memcmp et al –udi_snprintf, udi_strtou32 Queue Management Utilities Endianness Management Utilities

Uniform Driver Interface Project UDI - Slide 47 Copyright 2010 Kurt Gollhardt Core Metalanguages Management Metalanguage –Environment-initiated control operations Generic I/O Metalanguage –Generic read/write plus custom ops –Useful for prototyping and “one-off” extensions –Used to access driver diagnostics

Uniform Driver Interface Project UDI - Slide 48 Copyright 2010 Kurt Gollhardt Region Kill Different environments have different levels of trust in drivers UDI environments can: –detect misbehaved drivers (e.g. bad pointers) –track resource ownership and transfers –abruptly terminate (“region-kill”) driver instances »Frees all resources and shuts down device

Uniform Driver Interface Project UDI - Slide 49 Copyright 2010 Kurt Gollhardt Host OS UDI Environment Example UDI & I 2 O Combination OS-to-UDI External Mapper Application UDI Driver (OSM) I 2 O Mapper I 2 O RTOS System Bus Hardware I 2 O Mapper UDI Environment UDI Driver (HDM) I2O Messages