next up previous contents
Next: rtker's Device Driver Framework Up: Device Driver Framework Previous: Device Driver Framework   Contents

Introduction

A Device Driver Framework for an OS is a set of rules and protocols that govern how a Device Driver are written in that particular OS.

Each Device Driver expects some functionality from the host Operating System. This includes functions like sleep_on and wake_up 4.1 for process synchronization, functions like kmalloc and vmalloc for memory allocation, functions for timer management, and so on. 4.2 It is upto the host Operating System to provide the declare and define these functions.

At the same time the host Operating System expects the functionality of the Device Driver to be exported in certain well defined manner. For example in Linux, each device driver is supposed to register the driver (for that particular device) with the host Operating System through functinons like register_character_deivce and register_block_device. These functions take as arguement, a structure of pointers to functions for open, read, write, ioctl, lseek etc for that particular device. In this way the host operating system knows which functions to call if for example open is called on that device.

This two way interface between the host OS and the device drivers constitutes the Device Driver Framework. This framework is used by the Device Driver writers, who in general need not know much about the OS internals.


next up previous contents
Next: rtker's Device Driver Framework Up: Device Driver Framework Previous: Device Driver Framework   Contents
Soumyadeb Mitra 2002-08-07