DRIVER MODEL ULB Darmstadt

Size: px
Start display at page:

Download "DRIVER MODEL ULB Darmstadt"

Transcription

1 Microsoft" y / /«Second Edition PROGRAMMING MICROSO FT WIN D 0 WS DRIVER MODEL ULB Darmstadt i minis Walter Oney

2 Acknowledgments Introduction Beginning a Driver Project 1 A Brief History of Device Drivers 1 An Overview of the Operating Systems 5 Windows XP Overview 5 Windows 98/Windows Me Overview 8 What Kind of Driver Do I Need?. 10 WDM Drivers 12 Other Types of Drivers 15 Management Overview and Checklist 16 Basic Structure of a WDM Driver 21 How Drivers Work 21 How Applications Work 22 Device Drivers 24 How the System Finds and Loads Drivers 27 Device and Driver Layering 28 Plug and Play Devices 31 Legacy Devices ^ 35 Recursive Enumeration 38 Order of Driver Loading 38 IRP Routing 41 The Two Basic Data Structures 47 Driver Objects 47 Device Objects 51 The DriverEntry Routine 54 Overview of DriverEntry 56 DriverUnload 59 The AddDevice Routine 60 Creating a Device Object 61 xv xvii

3 vi Table of Contents Naming Devices 63 Other Global Device Initialization 80 Putting the Pieces Together 86 Windows 98/Me Compatibility Notes 87 Differences in DriverEntry Call 87 DriverUnload 87 The \GL0BAL?? Directory 87 Unimplemented Device Types 87 Basic Programming Techniques 89 The Kernel-Mode Programming Environment 89 Using Standard Run-Time Library Functions 91 A Caution About Side Effects 92 Error Handling 92 Status Codes 93 Structured Exception Handling 95 Bug Checks 106 Memory Management 107 User-Mode and Kernel-Mode Address Spaces 108 Heap Allocator 117 Linked Lists 124 Lookaside Lists 130 String Handling 134 Miscellaneous Programming Techniques -> 138 Accessing the Registry 138 Accessing Files 147 Floating-Point Calculations 151 Making Debugging Easier 152 Windows 98/Me Compatibility Notes 157 File I/O 157 Floating Point 158 Synchronization 161 An Archetypal Synchronization Problem 162 Interrupt Request Level 164 IRQL in Operation 167 IRQL Compared with Thread Priorities 168

4 Table of Contents vii IRQL and Paging 168 Implicitly Controlling IRQL " 169 Explicitly Controlling IRQL. 171 Spin Locks 172 Some Facts About Spin Locks 173 Working with Spin Locks 174 Queued Spin Locks 176 Kernel Dispatcher Objects 177 How and When You Can Block 178 Waiting on a Single Dispatcher Object 180 Waiting on Multiple Dispatcher Objects 183 Kernel Events 184 Kernel Semaphores 188 Kernel Mutexes 190 Kernel Timers 191 Using Threads for Synchronization 197 Thread Alerts and APCs 198 Other Kernel-Mode Synchronization Primitives 201 Fast Mutex Objects 201 Interlocked Arithmetic 206 Interlocked List Access 210 Windows 98/Me Compatibility Notes 214 The I/O Request Packet 215 Data Structures Structure of an IRP 215 The I/O Stack 219 The "Standard Model" for IRP Processing 222 Creating an IRP 223 Forwarding to a Dispatch Routine 226 Duties of a Dispatch Routine 232 The Startlo Routine 239 The Interrupt Service Routine 241 Deferred Procedure Call Routine 241 Completion Routines 242

5 viii Table of Contents Queuing I/O Requests 256 Using the DEVQUEUE Object 260 Using Cancel-Safe Queues 263 Cancelling I/O Requests 269 If It Weren't for Multitasking... " 270 Synchronizing Cancellation 270 Some Details of IRP Cancellation 272 How the DEVQUEUE Handles Cancellation, 273 Cancelling IRPs You Create or Handle, 280 Handling IRP_MJ_CLEANUP,. 289 Cleanup with a DEVQUEUE 291 Cleanup with a Cancel-Safe Queue 293 Summary Eight IRP-Handling Scenarios 293 Scenario 1 Pass Down with Completion Routine 294 Scenario 2 Pass Down Without Completion Routine 295 Scenario 3 Complete in the Dispatch Routine 296 Scenario 4 Queue for Later Processing 297 Scenario 5 Your Own Asynchronous IRP 299 Scenario 6 Your Own Synchronous IRP 301 Scenario 7 Synchronous Pass Down 303 Scenario 8 Asynchronous IRP Handled Synchronously 304 Plug and Play for Function Drivers 307 IRP_MJ_PNP Dispatch Function 310 Starting and Stopping Your Device 312 IRP_MN_START_DEVICE 313 IRP_MN_STOP_DEVICE 316 IRP_MN_REMOVE_DEVICE 318 IRP_MN_SURPRISE_REMOVAL 319 Managing PnP State Transitions 320 Starting the Device 323 Is It OK to Stop the Device? 323 While the Device Is Stopped 325 Is It OK to Remove the Device? 326 Synchronizing Removal 328 Why Do I Need Remove Lock, Anyway? 332 How the DEVQUEUEWorks with PnP 338

6 Table of Contents ix Other Configuration Functionality 342 Filtering Resource Requirements 342 Device Usage Notifications 344 PnP Notifications 347 Windows 98/Me Compatibility Notes 360 Surprise Removal 360 PnP Notifications 361 The Remove Lock Reading and Writing Data 363 Configuring Your Device 363 Addressing a Data Buffer 367 Specifying a Buffering Method 368 Ports and Registers 373 Port Resources 375 Memory Resources 377 Servicing an Interrupt 379 Configuring an Interrupt 379 Handling Interrupts 381 Deferred Procedure Calls 385 A Simple Interrupt-Driven Device 389 Direct Memory Access 397 Transfer Strategies 399 Performing DMA Transfers 401 Using a Common Buffer 418 ' A Simple Bus-Master Device 421 Windows 98/Me Compatibility Notes Power Management 425 The WDM Power Model 426 The Roles of WDM Drivers 426 Device Power and System Power States 427 Power State Transitions 428 Handling IRP_MJ_POWER Requests 429 Managing Power Transitions 433 Required Infrastructure 436 Initial Triage 437 System Power IRPs That Increase Power 438

7 Table of Contents System Power IRPs That Decrease Power 446 Device Power IRPs 449 Additional Power-Management Details 460 Flags to Set in AddDevice 460 Device Wake-Up Features 461 Powering Off When Idle 469 Using Sequence Numbers to Optimize State Changes 474 Windows 98/Me Compatibility Notes 475 The Importance of DO_POWER_PAGABLE 475 Completing Power IRPs 475 Requesting Device Power IRPs 476 PoCallDriver 476 Other Differences I/O Control Operations 479 The DeviceloControl API 480 Synchronous and Asynchronous Calls to DeviceloControl 481 Defining I/O Control Codes 483 Handling IRP_MJ_DEVICE_CONTROL 485 METHOD_BUFFERED 488 The DIRECT Buffering Methods 489 METHOD_NEITHER 491 Designing a Safe and Secure IOCTL Interface 492 Internal I/O Control Operations 494 Notifying Applications of Interesting Events 497 Using a Shared Event for Notification 499 Using a Pending IOCTL for Notification 500 Windows 98/Me Compatibility Notes Windows Management Instrumentation 507 WMI Concepts 508 A Sample Schema 510 Mapping WMI Classes to C Structures 511 WDM Drivers and WMI 512 Delegating IRPs to WMILIB 514 Advanced Features 523 Windows 98/Me Compatibility Notes 534

8 Table of Contents xi 11 Controller and Multifunction Devices 535 Overall Architecture 536 Child Device Objects 536 Handling PnP Requests 539 Telling the PnP Manager About Our Children 541 PDO Handling of PnP Requests 542 Handling Device Removal 546 Handling IRP_MN_QUERY_ID 547 Handling IRP_MN_QUERY_DEVICE_RELATIONS 548 Handling IRP_MN_QUERYJNTERFACE 549 Handling Power Requests 554 Handling Child Device Resources The Universal Serial Bus 559 Programming Architecture 561 Device Hierarchy 561 What's in a Device? 563 Information Flow 566 Descriptors 579 Working with the Bus Driver 589 Initiating Requests 590 Configuration 593 Managing Bulk Transfer Pipes 604 Managing Interrupt Pipes 613 Control Requests 614 Managing Isochronous Pipes 617 Idle Power Management for USB Devices ' Human Interface Devices 639 Drivers for HID Devices 640 Reports and Report Descriptors 640 Sample Keyboard Descriptor 641 HIDFAKE Descriptor 644 tf/dcmssminidrivers 646 DriverEntry 646 Driver Callback Routines 647 Internal IOCTL Interface 655

9 xii Table of Contents Windows 98/Me Compatibility Notes 670 Handling IRP_MN_QUERY_ID 670 Joysticks Specialized Topics 673 Logging Errors 673 Creating an Error Log Packet 675 Creating a Message File 678 System Threads 682 Creating and Terminating System Threads 683 Using a System Thread for Device Polling 686 Work Items 689 Watchdog Timers 691 Windows 98/Me Compatibility Notes 695 Error Logging 695 Waiting for System Threads to Finish 695 Work Items Distributing Device Drivers 697 The Role of the Registry 698 The Hardware (Instance) Key 699 The Class Key 701 The Driver Key 703 The Service (Software) Key 703 Accessing the Registry from a Program 704 Device Object Properties 708 The INF File 709 Install Sections 713 Populating the Registry 718 Security Settings 723 Strings and Localization 725 Device Identifiers 726 Driver Ranking 732 Tools for INF Files 734 Defining a Device Class 737 A Property Page Provider 738

10 Table of Contents xiii Customizing Setup 743 Installers and Co-installers 744 Preinstalling Driver Files 752 Value-Added Software 753 Installing a Driver Programmatically 754 The RunOnce Key 754 Launching an Application 755 The Windows Hardware Quality Lab " 756 Running the Hardware Compatibility Tests 757 Submitting a Driver Package 763 Windows 98/Me Compatibility Notes 769 Property Page Providers 769 Installers and Co-installers 770 Preinstalled Driver Packages 770 Digital Signatures 770 Installing Drivers Programmatically 770 CONFIGMG API 770 INF Incompatibilities 771 Registry Usage 771 Getting Device Properties Filter Drivers 773 The Role of a Filter Driver 773 Upper Filter Drivers 773 Lower Filter Drivers 778 Mechanics of a Filter Driver 779 The DriverEntry Routine 779 The AddDevice Routine 780 The DispatchAny Function 783 The DispatchPower Routine 784 The DispatchPnp Routine 784 Installing a Filter Driver 787 Installing a Class Filter 787 Installing a Device Filter with the Function Driver 790 Installing a Device Filter for an Existing Device 790

11 xiv Table of Contents Case Studies 791 Lower Filter for Traffic Monitoring 791 Named Filters 792 Bus Filters 795 Keyboard and Mouse Filters 796 Filtering Other HID Devices 799 Windows 98/Me Compatibility Notes WDM Filters for VxD Drivers 800 INF Shortcut 800 Class Filter Drivers 800 A Coping with Cross-Platform Incompatibilities 801 Determining the Operating System Version 801 Run-Time Dynamic Linking 802 Checking Platform Compatibility 803 Defining Win98/Me Stubs for Kernel-Mode Routines 805 Version Compatibility 806 Stub Functions 807 Using WDMSTUB. 809 Interaction Between WDMSTUB and WDMCHECK 810 Special Licensing Note 810 B Using WDMWIZ.AWX 811 Basic Driver Information 811 DeviceloControl Codes 814 I/O Resources 815 USB Endpoints 815 WMI Support 817 Parameters for the INF File 818 Now What? 819 Index 821

Ausgewählte Betriebssysteme - Mark Russinovich & David Solomon (used with permission of authors)

Ausgewählte Betriebssysteme - Mark Russinovich & David Solomon (used with permission of authors) Outline Windows 2000 - The I/O Structure Ausgewählte Betriebssysteme Institut Betriebssysteme Fakultät Informatik Components of I/O System Plug n Play Management Power Management I/O Data Structures File

More information

Universal Windows Driver Development with WDF UMDF 2.0 and KMDF for IoT, Desktop and Server

Universal Windows Driver Development with WDF UMDF 2.0 and KMDF for IoT, Desktop and Server KMDF - Version: 1.2 11 January 2018 Universal Windows Driver Development with WDF UMDF 2.0 and KMDF for IoT, Desktop and Server Universal Windows Driver Development with WDF UMDF 2.0 and KMDF for IoT,

More information

USB Complete. The Developer's Guide Fifth Edition. Jan Axelson. Lakeview Research LLC Madison, WI 53704

USB Complete. The Developer's Guide Fifth Edition. Jan Axelson. Lakeview Research LLC Madison, WI 53704 USB Complete The Developer's Guide Fifth Edition Jan Axelson Lakeview Research LLC Madison, WI 53704 Contents Introduction 1 USB Basics 1 Uses and limits 1 Benefits for users 2 Benefits for developers

More information

Design and Implementation of Peripheral Sharing Mechanism on Pervasive Computing with Heterogeneous Environment

Design and Implementation of Peripheral Sharing Mechanism on Pervasive Computing with Heterogeneous Environment Design and Implementation of Peripheral Sharing Mechanism on Pervasive Computing with Heterogeneous Environment Wonhong Kwon, Han Wook Cho, and Yong Ho Song College of Information and Communications, Hanyang

More information

Outline. Process and Thread Management. Data Structures (2) Data Structures. Kernel Process Block (PCB)

Outline. Process and Thread Management. Data Structures (2) Data Structures. Kernel Process Block (PCB) Outline Process and Thread Management Ausgewählte Betriebssysteme Professur Betriebssysteme Fakultät Informatik Data Structures Process Creation Thread Creation Scheduling 2 Data Structures Data Structures

More information

Process and Thread Management

Process and Thread Management Process and Thread Management Ausgewählte Betriebssysteme Professur Betriebssysteme Fakultät Informatik Data Structures Process Creation Thread Creation Scheduling Outline 2 1 Data Structures Process represented

More information

Introduction to I/O. 1-Slide Overview to File Management

Introduction to I/O. 1-Slide Overview to File Management Introduction to I/O 1-Slide Overview to File Management I/O Hardware I/O Application Interface I/O Subsystem Issues Note: much material in this set of slides comes directly from Solomon&Russinovich, Inside

More information

Microsoft. Microsoft Visual C# Step by Step. John Sharp

Microsoft. Microsoft Visual C# Step by Step. John Sharp Microsoft Microsoft Visual C#- 2010 Step by Step John Sharp Table of Contents Acknowledgments Introduction xvii xix Part I Introducing Microsoft Visual C# and Microsoft Visual Studio 2010 1 Welcome to

More information

KOSR 22 차세미나. KOSR 연역및소개 t h K o r e a O p e r a t i n g S y s t e m S e m e n a r

KOSR 22 차세미나. KOSR 연역및소개 t h K o r e a O p e r a t i n g S y s t e m S e m e n a r KOSR 22 차세미나 KOSR 연역및소개 http://www.kosr.org 1 KOSR 연혁과이념 KOSR 연혁 (2001 ~ ) - 2001.11.02 : WSP(Windows System Programmer) 커뮤니티 Open - 2003.01.19 : KSP(Korea System Programmer) 로독립 - 2004.12.01 : KOSR (Korea

More information

CSE 451: Operating Systems Winter I/O System. Gary Kimura

CSE 451: Operating Systems Winter I/O System. Gary Kimura CSE 451: Operating Systems Winter 2012 I/O System Gary Kimura What s Ahead Principles of I/O Hardware Structuring of I/O Software Layers of an I/O System Operation of an I/O System 2 Hardware Environment

More information

CS 134. Operating Systems. April 8, 2013 Lecture 20. Input/Output. Instructor: Neil Rhodes. Monday, April 7, 14

CS 134. Operating Systems. April 8, 2013 Lecture 20. Input/Output. Instructor: Neil Rhodes. Monday, April 7, 14 CS 134 Operating Systems April 8, 2013 Lecture 20 Input/Output Instructor: Neil Rhodes Hardware How hardware works Operating system layer What the kernel does API What the programmer does Overview 2 kinds

More information

6 jusb Driver. Java USB API for Windows

6 jusb Driver. Java USB API for Windows 6 jusb Driver Driver writing and driver development is very complex. We refer to the book written by Walter Oney Programming The Microsoft Windows Driver Model [4] to get into driver development within

More information

Microsoft Visual C# Step by Step. John Sharp

Microsoft Visual C# Step by Step. John Sharp Microsoft Visual C# 2013 Step by Step John Sharp Introduction xix PART I INTRODUCING MICROSOFT VISUAL C# AND MICROSOFT VISUAL STUDIO 2013 Chapter 1 Welcome to C# 3 Beginning programming with the Visual

More information

Table of Contents. Preface... xi

Table of Contents. Preface... xi ,ldr3toc.fm.4587 Page v Thursday, January 20, 2005 9:30 AM Table of Contents Preface................................................................. xi 1. An Introduction to Device Drivers.....................................

More information

Chapter 1 Storage Drivers

Chapter 1 Storage Drivers 1.0 Storage Drivers Page 1 of 79 Chapter 1 Storage Drivers This chapter contains the following information: 1.1 Storage Driver Architecture 1.2 Storage Drivers and Device Objects 1.3 System Header Files

More information

Operating System: Chap13 I/O Systems. National Tsing-Hua University 2016, Fall Semester

Operating System: Chap13 I/O Systems. National Tsing-Hua University 2016, Fall Semester Operating System: Chap13 I/O Systems National Tsing-Hua University 2016, Fall Semester Outline Overview I/O Hardware I/O Methods Kernel I/O Subsystem Performance Application Interface Operating System

More information

Wind River USB for VxWorks 6 Programmer's Guide. Wind River USB for VxWorks 6 PROGRAMMER S GUIDE 2.3

Wind River USB for VxWorks 6 Programmer's Guide. Wind River USB for VxWorks 6 PROGRAMMER S GUIDE 2.3 Wind River USB for VxWorks 6 Programmer's Guide Wind River USB for VxWorks 6 PROGRAMMER S GUIDE 2.3 Copyright 2006 Wind River Systems, Inc. All rights reserved. No part of this publication may be reproduced

More information

3.1 Introduction. Computers perform operations concurrently

3.1 Introduction. Computers perform operations concurrently PROCESS CONCEPTS 1 3.1 Introduction Computers perform operations concurrently For example, compiling a program, sending a file to a printer, rendering a Web page, playing music and receiving e-mail Processes

More information

Silberschatz and Galvin Chapter 12

Silberschatz and Galvin Chapter 12 Silberschatz and Galvin Chapter 12 I/O Systems CPSC 410--Richard Furuta 3/19/99 1 Topic overview I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O requests to hardware operations

More information

The control of I/O devices is a major concern for OS designers

The control of I/O devices is a major concern for OS designers Lecture Overview I/O devices I/O hardware Interrupts Direct memory access Device dimensions Device drivers Kernel I/O subsystem Operating Systems - June 26, 2001 I/O Device Issues The control of I/O devices

More information

Lecture 15: I/O Devices & Drivers

Lecture 15: I/O Devices & Drivers CS 422/522 Design & Implementation of Operating Systems Lecture 15: I/O Devices & Drivers Zhong Shao Dept. of Computer Science Yale University Acknowledgement: some slides are taken from previous versions

More information

Windows 7 Overview. Windows 7. Objectives. The History of Windows. CS140M Fall Lake 1

Windows 7 Overview. Windows 7. Objectives. The History of Windows. CS140M Fall Lake 1 Windows 7 Overview Windows 7 Overview By Al Lake History Design Principles System Components Environmental Subsystems File system Networking Programmer Interface Lake 2 Objectives To explore the principles

More information

Programming with POSIX Threads

Programming with POSIX Threads Programming with POSIX Threads David R. Butenhof :vaddison-wesley Boston San Francisco New York Toronto Montreal London Munich Paris Madrid Capetown Sidney Tokyo Singapore Mexico City Contents List of

More information

Windows History 2009 Windows 7 2

Windows History 2009 Windows 7 2 Example: Windows 1 Windows History 2009 Windows 7 2 Features added Windows2000 additions Plug-and-play Network directory service New GUI Vista additions New GUI More focus on security clean-up the code

More information

Windows Interrupts

Windows Interrupts Windows 2000 - Interrupts Ausgewählte Betriebssysteme Institut Betriebssysteme Fakultät Informatik 1 Interrupts Software and Hardware Interrupts and Exceptions Kernel installs interrupt trap handlers Interrupt

More information

1 OBJECT-ORIENTED PROGRAMMING 1

1 OBJECT-ORIENTED PROGRAMMING 1 PREFACE xvii 1 OBJECT-ORIENTED PROGRAMMING 1 1.1 Object-Oriented and Procedural Programming 2 Top-Down Design and Procedural Programming, 3 Problems with Top-Down Design, 3 Classes and Objects, 4 Fields

More information

Chapter 13: I/O Systems

Chapter 13: I/O Systems Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Streams Performance Objectives Explore the structure of an operating

More information

BOOTSTRAP YOURSELF WITH LINUX-USB STACK: DESIGN, DEVELOP, DEBUG, AND VALIDATE EMBEDDED USB

BOOTSTRAP YOURSELF WITH LINUX-USB STACK: DESIGN, DEVELOP, DEBUG, AND VALIDATE EMBEDDED USB BOOTSTRAP YOURSELF WITH LINUX-USB STACK: DESIGN, DEVELOP, DEBUG, AND VALIDATE EMBEDDED USB RAJARAM REGUPATHY Course Technology PTR A part of Cengage Learning ;

More information

Interrupt transfers & USB 2.0 & USB 3.0. Group Members Mehwish Awan Mehwish Kiran

Interrupt transfers & USB 2.0 & USB 3.0. Group Members Mehwish Awan Mehwish Kiran Interrupt transfers & Isochronous transfers in USB 2.0 & USB 3.0 Group Members Mehwish Awan Mehwish Kiran Agenda What is isochronous transfer? Use of isochronous transfer Format of isochronous transactions

More information

CSE 4/521 Introduction to Operating Systems. Lecture 29 Windows 7 (History, Design Principles, System Components, Programmer Interface) Summer 2018

CSE 4/521 Introduction to Operating Systems. Lecture 29 Windows 7 (History, Design Principles, System Components, Programmer Interface) Summer 2018 CSE 4/521 Introduction to Operating Systems Lecture 29 Windows 7 (History, Design Principles, System Components, Programmer Interface) Summer 2018 Overview Objective: To explore the principles upon which

More information

Module 12: I/O Systems

Module 12: I/O Systems Module 12: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Performance Operating System Concepts 12.1 Silberschatz and Galvin c

More information

Module 12: I/O Systems

Module 12: I/O Systems Module 12: I/O Systems I/O hardwared Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Performance 12.1 I/O Hardware Incredible variety of I/O devices Common

More information

Device-Functionality Progression

Device-Functionality Progression Chapter 12: I/O Systems I/O Hardware I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Incredible variety of I/O devices Common concepts Port

More information

Chapter 12: I/O Systems. I/O Hardware

Chapter 12: I/O Systems. I/O Hardware Chapter 12: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations I/O Hardware Incredible variety of I/O devices Common concepts Port

More information

Chapter 13: I/O Systems

Chapter 13: I/O Systems Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Streams Performance I/O Hardware Incredible variety of I/O devices Common

More information

Today: I/O Systems. Architecture of I/O Systems

Today: I/O Systems. Architecture of I/O Systems Today: I/O Systems How does I/O hardware influence the OS? What I/O services does the OS provide? How does the OS implement those services? How can the OS improve the performance of I/O? Lecture 20, page

More information

Chapter 13: I/O Systems

Chapter 13: I/O Systems Chapter 13: I/O Systems Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Streams Performance 13.2 Silberschatz, Galvin

More information

Chapter 13: I/O Systems. Chapter 13: I/O Systems. Objectives. I/O Hardware. A Typical PC Bus Structure. Device I/O Port Locations on PCs (partial)

Chapter 13: I/O Systems. Chapter 13: I/O Systems. Objectives. I/O Hardware. A Typical PC Bus Structure. Device I/O Port Locations on PCs (partial) Chapter 13: I/O Systems Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Streams Performance 13.2 Silberschatz, Galvin

More information

ECE 485/585 Microprocessor System Design

ECE 485/585 Microprocessor System Design Microprocessor System Design Lecture 3: Polling and Interrupts Programmed I/O and DMA Interrupts Zeshan Chishti Electrical and Computer Engineering Dept Maseeh College of Engineering and Computer Science

More information

Chapter 8: I/O functions & socket options

Chapter 8: I/O functions & socket options Chapter 8: I/O functions & socket options 8.1 Introduction I/O Models In general, there are normally two phases for an input operation: 1) Waiting for the data to arrive on the network. When the packet

More information

I/O Handling. ECE 650 Systems Programming & Engineering Duke University, Spring Based on Operating Systems Concepts, Silberschatz Chapter 13

I/O Handling. ECE 650 Systems Programming & Engineering Duke University, Spring Based on Operating Systems Concepts, Silberschatz Chapter 13 I/O Handling ECE 650 Systems Programming & Engineering Duke University, Spring 2018 Based on Operating Systems Concepts, Silberschatz Chapter 13 Input/Output (I/O) Typical application flow consists of

More information

Linux Driver and Embedded Developer

Linux Driver and Embedded Developer Linux Driver and Embedded Developer Course Highlights The flagship training program from Veda Solutions, successfully being conducted from the past 10 years A comprehensive expert level course covering

More information

WinHEC /11/2008

WinHEC /11/2008 1 New folder makes it easier to find and use devices Simplified pairing for Bluetooth, Wi-Fi, WUSB, and more Multifunction devices appear as one device Album Art for devices enriches the user experience

More information

Input/Output Systems

Input/Output Systems Input/Output Systems CSCI 315 Operating Systems Design Department of Computer Science Notice: The slides for this lecture have been largely based on those from an earlier edition of the course text Operating

More information

CSE 120. Overview. July 27, Day 8 Input/Output. Instructor: Neil Rhodes. Hardware. Hardware. Hardware

CSE 120. Overview. July 27, Day 8 Input/Output. Instructor: Neil Rhodes. Hardware. Hardware. Hardware CSE 120 July 27, 2006 Day 8 Input/Output Instructor: Neil Rhodes How hardware works Operating Systems Layer What the kernel does API What the programmer does Overview 2 Kinds Block devices: read/write

More information

Linux Kernel Architecture

Linux Kernel Architecture Professional Linux Kernel Architecture Wolf gang Mauerer WILEY Wiley Publishing, Inc. Introduction xxvii Chapter 1: Introduction and Overview 1 Tasks of the Kernel v -- 2 Implementation Strategies 3 Elements

More information

Remote Access Guide. https://remote.lghealth.org

Remote Access Guide. https://remote.lghealth.org Remote Access Guide https://remote.lghealth.org Created by: Joshua Steele Revision 1.0 7/14/2015 Table of Contents I. Remote Access using Internet Explorer... 2 II. Remote Access using Google Chrome...

More information

I/O AND DEVICE HANDLING Operating Systems Design Euiseong Seo

I/O AND DEVICE HANDLING Operating Systems Design Euiseong Seo I/O AND DEVICE HANDLING 2016 Operating Systems Design Euiseong Seo (euiseong@skku.edu) I/O Hardware Incredible variety of I/O devices Common concepts Port Bus (daisy chain or shared direct access) Controller

More information

Chapter 13: I/O Systems. Operating System Concepts 9 th Edition

Chapter 13: I/O Systems. Operating System Concepts 9 th Edition Chapter 13: I/O Systems Silberschatz, Galvin and Gagne 2013 Chapter 13: I/O Systems Overview I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations

More information

CSC 4320 Test 1 Spring 2017

CSC 4320 Test 1 Spring 2017 CSC 4320 Test 1 Spring 2017 Name 1. What are the three main purposes of an operating system? 2. Which of the following instructions should be privileged? a. Set value of timer. b. Read the clock. c. Clear

More information

COPYRIGHTED MATERIAL. Table of Contents. Foreword... xv. About This Book... xvii. About The Authors... xxiii. Guide To The Reader...

COPYRIGHTED MATERIAL. Table of Contents. Foreword... xv. About This Book... xvii. About The Authors... xxiii. Guide To The Reader... Table of Contents Foreword..................... xv About This Book... xvii About The Authors............... xxiii Guide To The Reader.............. xxvii Part I Some Concepts.................. 1 1 On Patterns

More information

System Administration of PTC Windchill 11.0

System Administration of PTC Windchill 11.0 System Administration of PTC Windchill 11.0 Overview Course Code Course Length TRN-4830-T 16 Hours In this course, you will gain an understanding of how to perform routine Windchill system administration

More information

RTX64 Features by Release

RTX64 Features by Release RTX64 Features by Release IZ-DOC-X64-0089-R4 January 2015 Operating System and Visual Studio Support WINDOWS OPERATING SYSTEM RTX64 2013 RTX64 2014 Windows 8 No Yes* Yes* Yes Windows 7 Yes (SP1) Yes (SP1)

More information

Processes and Non-Preemptive Scheduling. Otto J. Anshus

Processes and Non-Preemptive Scheduling. Otto J. Anshus Processes and Non-Preemptive Scheduling Otto J. Anshus Threads Processes Processes Kernel An aside on concurrency Timing and sequence of events are key concurrency issues We will study classical OS concurrency

More information

- Knowledge of basic computer architecture and organization, ECE 445

- Knowledge of basic computer architecture and organization, ECE 445 ECE 446: Device Driver Development Fall 2014 Wednesdays 7:20-10 PM Office hours: Wednesdays 6:15-7:15 PM or by appointment, Adjunct office Engineering Building room 3707/3708 Last updated: 8/24/14 Instructor:

More information

Fredrick M. Cady. Assembly and С Programming forthefreescalehcs12 Microcontroller. шт.

Fredrick M. Cady. Assembly and С Programming forthefreescalehcs12 Microcontroller. шт. SECOND шт. Assembly and С Programming forthefreescalehcs12 Microcontroller Fredrick M. Cady Department of Electrical and Computer Engineering Montana State University New York Oxford Oxford University

More information

CIS 21 Final Study Guide. Final covers ch. 1-20, except for 17. Need to know:

CIS 21 Final Study Guide. Final covers ch. 1-20, except for 17. Need to know: CIS 21 Final Study Guide Final covers ch. 1-20, except for 17. Need to know: I. Amdahl's Law II. Moore s Law III. Processes and Threading A. What is a process? B. What is a thread? C. Modes (kernel mode,

More information

Operating Systems 2010/2011

Operating Systems 2010/2011 Operating Systems 2010/2011 Input/Output Systems part 1 (ch13) Shudong Chen 1 Objectives Discuss the principles of I/O hardware and its complexity Explore the structure of an operating system s I/O subsystem

More information

Introduction. CS3026 Operating Systems Lecture 01

Introduction. CS3026 Operating Systems Lecture 01 Introduction CS3026 Operating Systems Lecture 01 One or more CPUs Device controllers (I/O modules) Memory Bus Operating system? Computer System What is an Operating System An Operating System is a program

More information

To Everyone... iii To Educators... v To Students... vi Acknowledgments... vii Final Words... ix References... x. 1 ADialogueontheBook 1

To Everyone... iii To Educators... v To Students... vi Acknowledgments... vii Final Words... ix References... x. 1 ADialogueontheBook 1 Contents To Everyone.............................. iii To Educators.............................. v To Students............................... vi Acknowledgments........................... vii Final Words..............................

More information

Input / Output. Kevin Webb Swarthmore College April 12, 2018

Input / Output. Kevin Webb Swarthmore College April 12, 2018 Input / Output Kevin Webb Swarthmore College April 12, 2018 xkcd #927 Fortunately, the charging one has been solved now that we've all standardized on mini-usb. Or is it micro-usb? Today s Goals Characterize

More information

CSCE Introduction to Computer Systems Spring 2019

CSCE Introduction to Computer Systems Spring 2019 CSCE 313-200 Introduction to Computer Systems Spring 2019 Processes Dmitri Loguinov Texas A&M University January 24, 2019 1 Chapter 3: Roadmap 3.1 What is a process? 3.2 Process states 3.3 Process description

More information

Windows Kernel Internals II Overview University of Tokyo July 2004*

Windows Kernel Internals II Overview University of Tokyo July 2004* Windows Kernel Internals II Overview University of Tokyo July 2004* Dave Probert, Ph.D. Advanced Operating Systems Group Windows Core Operating Systems Division Microsoft Corporation Microsoft Corporation

More information

ABOUT THE AUTHOR AND THE TECHNICAL REVIEWER. Who Is This Book For?...xxiii Prerequisites...xxiv Contents at a Glance...xxiv Welcome Aboard!...

ABOUT THE AUTHOR AND THE TECHNICAL REVIEWER. Who Is This Book For?...xxiii Prerequisites...xxiv Contents at a Glance...xxiv Welcome Aboard!... CONTENTS IN DETAIL ABOUT THE AUTHOR AND THE TECHNICAL REVIEWER xvii FOREWORD by John Baldwin xix ACKNOWLEDGMENTS xxi INTRODUCTION xxiii Who Is This Book For?...xxiii Prerequisites...xxiv Contents at a

More information

Developing Filter Manager Minifilters for Windows

Developing Filter Manager Minifilters for Windows Developing Filter Manager Minifilters for Windows Overview File systems on Windows are deeply integrated with the operating system. This integration is: filled with legacy edge cases, constantly evolving

More information

I/O Systems. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

I/O Systems. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University I/O Systems Jinkyu Jeong (jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics Device characteristics Block device vs. Character device Direct I/O vs.

More information

Micrium OS Kernel Labs

Micrium OS Kernel Labs Micrium OS Kernel Labs 2018.04.16 Micrium OS is a flexible, highly configurable collection of software components that provides a powerful embedded software framework for developers to build their application

More information

Processor : Intel Pentium D3.0 GigaHtz

Processor : Intel Pentium D3.0 GigaHtz CHALAPATHI INSTITUTE OF ENGINEERING & TECHNOLOGY CHALAPATHI NAGAR LAM,GUNTUR DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING INTRODUCTION ABOUT 'L2' LAB There are 30 systems (HCL) installed in this Lab.

More information

Hardware OS & OS- Application interface

Hardware OS & OS- Application interface CS 4410 Operating Systems Hardware OS & OS- Application interface Summer 2013 Cornell University 1 Today How my device becomes useful for the user? HW-OS interface Device controller Device driver Interrupts

More information

Module 23: Windows NT. Windows NT

Module 23: Windows NT. Windows NT Module 23: Windows NT History Design Principles System Components Environmental Subsystems File System Networking Programmer Interface Operating System Concepts 23.1 Silberschatz and Galvin c 1998 Windows

More information

Module 23: Windows NT

Module 23: Windows NT Module 23: Windows NT History Design Principles System Components Environmental Subsystems File System Networking Programmer Interface Operating System Concepts 23.1 Silberschatz and Galvin c 1998 Windows

More information

Main Points of the Computer Organization and System Software Module

Main Points of the Computer Organization and System Software Module Main Points of the Computer Organization and System Software Module You can find below the topics we have covered during the COSS module. Reading the relevant parts of the textbooks is essential for a

More information

Chapter 13: I/O Systems

Chapter 13: I/O Systems COP 4610: Introduction to Operating Systems (Spring 2015) Chapter 13: I/O Systems Zhi Wang Florida State University Content I/O hardware Application I/O interface Kernel I/O subsystem I/O performance Objectives

More information

Operating Systems 2 nd semester 2016/2017. Chapter 4: Threads

Operating Systems 2 nd semester 2016/2017. Chapter 4: Threads Operating Systems 2 nd semester 2016/2017 Chapter 4: Threads Mohamed B. Abubaker Palestine Technical College Deir El-Balah Note: Adapted from the resources of textbox Operating System Concepts, 9 th edition

More information

Institute of Engineering & Management. Course:CS603- Operating System. Course pre-requisites

Institute of Engineering & Management. Course:CS603- Operating System. Course pre-requisites Course:CS60- Operating System PROGRAMME: COMPUTERSCIENCE&ENGINEERING DEGREE:B. TECH COURSE: Operating Systems SEMESTER: 6 CREDITS: COURSECODE: CS60 COURSE TYPE: Theory COURSE AREA/DOMAIN: CONTACTHOURS:

More information

Part 1: Introduction to device drivers Part 2: Overview of research on device driver reliability Part 3: Device drivers research at ERTOS

Part 1: Introduction to device drivers Part 2: Overview of research on device driver reliability Part 3: Device drivers research at ERTOS Some statistics 70% of OS code is in device s 3,448,000 out of 4,997,000 loc in Linux 2.6.27 A typical Linux laptop runs ~240,000 lines of kernel code, including ~72,000 loc in 36 different device s s

More information

I/O Systems. Jo, Heeseung

I/O Systems. Jo, Heeseung I/O Systems Jo, Heeseung Today's Topics Device characteristics Block device vs. Character device Direct I/O vs. Memory-mapped I/O Polling vs. Interrupts Programmed I/O vs. DMA Blocking vs. Non-blocking

More information

Chapter 3: Processes. Operating System Concepts 9 th Edition

Chapter 3: Processes. Operating System Concepts 9 th Edition Chapter 3: Processes Silberschatz, Galvin and Gagne 2013 Chapter 3: Processes Process Concept Process Scheduling Operations on Processes Interprocess Communication Examples of IPC Systems Communication

More information

by I.-C. Lin, Dept. CS, NCTU. Textbook: Operating System Concepts 8ed CHAPTER 13: I/O SYSTEMS

by I.-C. Lin, Dept. CS, NCTU. Textbook: Operating System Concepts 8ed CHAPTER 13: I/O SYSTEMS by I.-C. Lin, Dept. CS, NCTU. Textbook: Operating System Concepts 8ed CHAPTER 13: I/O SYSTEMS Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests

More information

Chapter 5 - Input / Output

Chapter 5 - Input / Output Chapter 5 - Input / Output Luis Tarrataca luis.tarrataca@gmail.com CEFET-RJ L. Tarrataca Chapter 5 - Input / Output 1 / 90 1 Motivation 2 Principle of I/O Hardware I/O Devices Device Controllers Memory-Mapped

More information

RTX64 Features by Release IZ-DOC-X R3

RTX64 Features by Release IZ-DOC-X R3 RTX64 Features by Release IZ-DOC-X64-0089-R3 January 2014 Operating System and Visual Studio Support WINDOWS OPERATING SYSTEM RTX64 2013 Windows 8 No Windows 7 (SP1) (SP1) Windows Embedded Standard 8 No

More information

Roadmap for This Lecture

Roadmap for This Lecture Thread Scheduling 1 Roadmap for This Lecture Overview Priorities Scheduling States Scheduling Data Structures Quantum Scheduling Scenarios Priority Adjustments (boosts and decays) Multiprocessor Scheduling

More information

CHAPTER 3 - PROCESS CONCEPT

CHAPTER 3 - PROCESS CONCEPT CHAPTER 3 - PROCESS CONCEPT 1 OBJECTIVES Introduce a process a program in execution basis of all computation Describe features of processes: scheduling, creation, termination, communication Explore interprocess

More information

EECS 482 Introduction to Operating Systems

EECS 482 Introduction to Operating Systems EECS 482 Introduction to Operating Systems Winter 2018 Harsha V. Madhyastha Monitors vs. Semaphores Monitors: Custom user-defined conditions Developer must control access to variables Semaphores: Access

More information

Testing and Debugging

Testing and Debugging Testing and Debugging 17 Testing and Debugging Tools In addition to the chip-specific development boards and debugging software described in Chapter 6, a variety of other hardware and software tools can

More information

Process Description and Control

Process Description and Control Process Description and Control B.Ramamurthy 1/28/02 B.Ramamurthy 1 Introduction The fundamental task of any operating system is process management. OS must allocate resources to processes, enable sharing

More information

"Charting the Course... Java Programming Language. Course Summary

Charting the Course... Java Programming Language. Course Summary Course Summary Description This course emphasizes becoming productive quickly as a Java application developer. This course quickly covers the Java language syntax and then moves into the object-oriented

More information

Chapter 13: I/O Systems

Chapter 13: I/O Systems Chapter 13: I/O Systems Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Streams Performance 13.2 Silberschatz, Galvin

More information

Pro ODP.NET for Oracle. Database 11 g. Edmund Zehoo. Apress

Pro ODP.NET for Oracle. Database 11 g. Edmund Zehoo. Apress Pro ODP.NET for Oracle Database 11 g Edmund Zehoo Apress Contents Contents at a Glance iv Contents....v About the Author About the Technical Reviewer Acknowledgments xvii xviii xix Chapter 1: Introduction

More information

POSIX Threads Programming

POSIX Threads Programming POSIX Threads Programming 1. Introduction 2. Pthreads Overview 2.1 What is a Thread? 2.2 What are Pthreads? 2.3 Why Pthreads? 2.4 Designing Threaded Programs 3. Compiling Pthreaded Programs 4. Reference

More information

Ver Control4 Drivers Made Easy. Google Calendar - Installation Manual

Ver Control4 Drivers Made Easy. Google Calendar - Installation Manual Ver. 1.0 Control4 Drivers Made Easy Google Calendar - Installation Manual THEDRIVERSLAB CONTROL4 DRIVERS MADE EASY Google Calendar Driver V.1.0.1 TheDriversLab https://www.thedriverslab.com Table of Contents

More information

Welcome to. Supporting Support. Presented by : T.Roy. CodeMachine Inc.

Welcome to. Supporting Support. Presented by : T.Roy. CodeMachine Inc. Welcome to Supporting Support Presented by : T.Roy CodeMachine Inc. www.codemachine.com Speaker Introduction Tilakraj Roy Roychoudhury Masters in Computer Engineering 20 years experience in system software

More information

BASIC INTERFACING CONCEPTS

BASIC INTERFACING CONCEPTS Contents i SYLLABUS UNIT - I 8085 ARCHITECTURE Introduction to Microprocessors and Microcontrollers, 8085 Processor Architecture, Internal Operations, Instructions and Timings, Programming the 8085-Introduction

More information

CSI3131 Final Exam Review

CSI3131 Final Exam Review CSI3131 Final Exam Review Final Exam: When: April 24, 2015 2:00 PM Where: SMD 425 File Systems I/O Hard Drive Virtual Memory Swap Memory Storage and I/O Introduction CSI3131 Topics Process Computing Systems

More information

Chapter 13: I/O Systems

Chapter 13: I/O Systems Chapter 13: I/O Systems DM510-14 Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations STREAMS Performance 13.2 Objectives

More information

CSE398: Network Systems Design

CSE398: Network Systems Design CSE398: Network Systems Design Instructor: Dr. Liang Cheng Department of Computer Science and Engineering P.C. Rossin College of Engineering & Applied Science Lehigh University February 23, 2005 Outline

More information

Operating Systems: Principles and Practice. Mark Zbikowski Gary Kimura (kudos to Tom Anderson)

Operating Systems: Principles and Practice. Mark Zbikowski Gary Kimura (kudos to Tom Anderson) Operating Systems: Principles and Practice Mark Zbikowski Gary Kimura (kudos to Tom Anderson) How This Course Fits in the UW CSE Curriculum CSE 333: Systems Programming Project experience in C/C++ How

More information

UNIT -3 PROCESS AND OPERATING SYSTEMS 2marks 1. Define Process? Process is a computational unit that processes on a CPU under the control of a scheduling kernel of an OS. It has a process structure, called

More information

RT3 - FreeRTOS Real Time Programming

RT3 - FreeRTOS Real Time Programming Formation FreeRTOS Real Time Programming: Real-time programming applied to the FreeRTOS operating system - Systèmes d'exploitation: RTOS RT3 - FreeRTOS Real Time Programming Real-time programming applied

More information

USBIO. USB Software Development Kit for Windows. Reference Manual. Version 2.0 January 31, 2003

USBIO. USB Software Development Kit for Windows. Reference Manual. Version 2.0 January 31, 2003 Thesycon Systemsoftware & Consulting GmbH USBIO USB Software Development Kit for Windows Reference Manual Version 2.0 January 31, 2003 Thesycon R Systemsoftware & Consulting GmbH Werner-von-Siemens-Str.

More information