Вы находитесь на странице: 1из 20

DEVICE DRIVERS

ABED TAWIAH ASARE (KUS01465)


2
What is a Device Driver?

 A device driver is a program routine that links a


peripheral device to an operating system of a
computer. It is essentially a software program
that allows a user to employ a device, such as
a printer, monitor, or mouse (Levenson & Hertz, 1994).

 When a new hardware device is added to the computer, such as a CD-ROM drive,
a printer, or a sound card, its driver must be installed in order to run it. The operating
system “calls” the driver, and the driver “drives” the device.

ABED TAWIAH ASARE - KUS01465 11/16/2018


3
What is a Device Driver?

A Device driver is a software that is used


to control a hardware device and make
it work on a computer system (Abed, 2018).

 In Windows operating systems, a device driver file


usually has a file name suffix of DLL or EXE. A virtual
device driver usually has the suffix of VXD

ABED TAWIAH ASARE - KUS01465 11/16/2018


4

Application to access hardware device via device driver

ABED TAWIAH ASARE - KUS01465 11/16/2018


5
Device Drivers can be mainly classified into three groups

 Character driver – This category deals with the character devices i.e., which transfer
data character-by-character. Examples include consoles, serial port, sensors etc.

 Block driver – For the devices that transfer data by a block size (thus called block
devices), the corresponding driver is called block device driver. For example, CD-
ROM, USB devices etc.

 Network driver – The devices that allows us to connect to a network and use the
network interface services.

Example – Ethernet card, NIC (Network Interface Card) etc.

ABED TAWIAH ASARE - KUS01465  11/16/2018


6
What Device Driver does:

 It allows a system to interface with hardware devices.

 It provides uniform APIs to access hardware.

 A device driver converts general I/O instructions into device specific operations.

 It is a translator between the operating system and applications that use the
devices, and the devices.

 It is like a black box that means, if any user-application wants to interact with the
hardware, it must go through the corresponding device driver only and not
directly as it might cause any damage to the hardware.

ABED TAWIAH ASARE - KUS01465 11/16/2018


7
Why Device Drivers usually installed on System OS

A typical computing system (PC, PDA, POS devices etc.) deals with a variety of devices

or peripherals, making a hardware device work as expected is a cumbersome task.

 Instead of adding device driver code to every application, the operating system

provides a single point interface for all devices by hosting the device drivers

 Adding it under the operating systems provides the protection and security needed

for the device drivers from malicious use.

 The device drivers are essentially shared dynamically linked libraries.

ABED TAWIAH ASARE - KUS01465 11/16/2018


8
Locating Device Drivers on Mac OS HIGH SIERRA

 Hardware Device Drivers in Mac OS are typically in the form of Kernel Extensions and the primary
location is: /System/Library/Extensions/
ABED TAWIAH ASARE - KUS01465 11/16/2018
9
Locating Device Drivers on Windows 10 OS

 C:\Windows\System32\DriverStore\

ABED TAWIAH ASARE - KUS01465 11/16/2018


10
Common Attributes of Device Drivers

 Kernel code
 Kernel interface
 Kernel mechanisms and services
 Loadable : run time
 Configurable: compile time
 Dynamic : device may not exist

ABED TAWIAH ASARE - KUS01465 11/16/2018


11

ABED TAWIAH ASARE - KUS01465 11/16/2018


12
Devices & Driver Examples

 Drivers: - printer driver


- Bluetooth dongle driver,
- gamepad driver

 Devices: - USB stick (Pendrive)


- Gamepad
- Web Cam

ABED TAWIAH ASARE - KUS01465 11/16/2018


13
Examples of Driver I/O Instructions

 What do you with a device? {read, write}, {read only},


{write only}

 Lets look at some examples: USB device, CD-ROM, LED


Display,

 What do you do with a file? open, close, read, write, ..

ABED TAWIAH ASARE - KUS01465 11/16/2018


14
Kernel

 The kernel is a computer program that is the


core of a computer's operating system, with
complete control over everything in the system.
On most systems, it is one of the first programs
loaded on start-up.
 Types of Kernel : - Microkernel
- Monolithic kernel

ABED TAWIAH ASARE - KUS01465 11/16/2018


15
Kernel

 The kernel's interface is a low-level abstraction


layer.
 When a process makes requests of the kernel, it is
called a system call.
 A monolithic kernel runs all the operating
system instructions in the same address space for
speed.
 A microkernel runs most processes in user space

ABED TAWIAH ASARE - KUS01465 11/16/2018


Splitting the Kernel 16

ABED TAWIAH ASARE - KUS01465 11/16/2018


17

HOW OS KERNEL INTERFACES WITH DEVICE DRIVERS & DEVICES


ABED TAWIAH ASARE - KUS01465 11/16/2018
18
MICROKERNEL

MONOTHOLIC KERNEL

ABED TAWIAH ASARE - KUS01465 11/16/2018


19
REFERENCES

 http://www.homesaustin.com/Documents/DeviceDrivers.pdf
 https://en.wikipedia.org/wiki/Kernel_(operating_system)
 https://static.lwn.net/images/pdf/LDD3/ch01.pdf
 https://www.vlsifacts.com/device-drivers-role-and-types/
 https://images.google.com

ABED TAWIAH ASARE - KUS01465 11/16/2018


20

THANK YOU
ABED TAWIAH ASARE - KUS01465 11/16/2018