Presentation is loading. Please wait.

Presentation is loading. Please wait.

Device Driver Presented By: Syed Zulfiqar Ali Qurat Ul Ain Aslam

Similar presentations


Presentation on theme: "Device Driver Presented By: Syed Zulfiqar Ali Qurat Ul Ain Aslam"— Presentation transcript:

1 Device Driver Presented By: Syed Zulfiqar Ali Qurat Ul Ain Aslam
Samina Kanwal Sana Zahid Presented To: Miss Madiha Zafar

2 What is a device driver? A device driver is a system program or application that controls a particular type of device that is connected to your computer. A device driver or software driver is a computer program, application allowing higher-level computer programs to interact with a hardware device. A device driver essentially converts the more generic input/output instructions of your operating system to message that the device type can understand and interpret.

3 Continue…

4 Why a device driver ? A device driver simplifies programming by acting as an abstraction layer between a hardware device and the applications or operating systems that use it The higher-level application code can be written independently of whatever specific hardware device it will ultimately control, as it can interface with it in a standard way, regardless of the underlying hardware. The device-driver accepts the generic high-level commands and breaks them into a series of low-level device-specific commands as required by the device being driven.

5 Why a device driver ? .. [contd.]
Device Drivers can provide a level of security as they can run in kernel- mode, thereby protecting the operating system from applications running in user-mode. Ring 0 Kernel Ring 1 Ring 2 Ring 3 Device Drivers Applications Lest Privileged Most Privileged Privilege rings available

6 Does every hardware or a device connected to pc requires device driver?
No when you buy an operating system many device drivers are built in into operating system itself. however 3-6 months down the line if you attach a device which your operating system doesnot understand then device driver is required

7 How does a driver communicates with hardware?
A device driver typically communicates with the device through the computer bus or communications subsystem to which the hardware is connected

8 Physical layers communicate with specific device instances
Device Driver design Logical Layer Logical layers process data for a class of devices such as ethernet ports or disk drives A serial port needs to handle standard communication protocols such as XON/XOFF . This is managed by a serial port logical layer. Physical Layer Physical layers communicate with specific device instances The logical layer needs to communicate with a particular serial port chip, the physical layer addresses this.

9 Device Driver Design …[Contd.]
OS Logical layer Physical layer Hardware request

10 Development Writing a device driver requires an in-depth understanding of how the hardware and the software works for a given platform function. Because drivers require low-level access to hardware functions in order to operate, drivers typically operate in a highly privileged environment and can cause disaster if they get things wrong. In contrast, most user-level software on modern operating systems can be stopped without greatly affecting the rest of the system. Even drivers executing in user mode can crash a system if the device is erroneously programmed. These factors make it more difficult and dangerous to diagnose problems.

11 Kernel mode vs. user mode
Device drivers, particularly on modern Microsoft Windows platforms, can run in kernel-mode (Ring 0 on x86 CPUs) or in user-mode (Ring 3 on x86 CPUs). The primary benefit of running a driver in user mode is improved stability, since a poorly written user mode device driver cannot crash the system by overwriting kernel memory.

12 How Drivers are accessed ?
System initialization System calls from user processes User-level requests Device interrupts Bus reset

13 Application Because of the diversity of modern hardware and operating systems, drivers operate in many different environments.Drivers may interface with: printers video adapters Network cards Sound cards Local buses of various sorts—in particular, for bus mastering on modern systems Low-bandwidth I/O buses of various sorts (for pointing devices such as mice, keyboards, USB, etc.) Computer storage devices such as hard disk, CD-ROM, and floppy disk buses (ATA, SATA, SCSI) Implementing support for different file systems Image scanners Digital cameras

14 Common levels of abstraction for device drivers include
For hardware: Interfacing directly Writing to or reading from a device control register Using some higher-level interface (e.g. Video BIOS) Using another lower-level device driver (e.g. file system drivers using disk drivers) Simulating work with hardware, while doing something entirely different For software: Allowing the operating system direct access to hardware resources Implementing only primitives Implementing an interface for non-driver software (e.g., TWAIN) Implementing a language, sometimes quite high-level (e.g., PostScript)

15 Are there any types in device driver?
Yes there are two types A: Open Driver file usually has a file name suffix of dll or exe B: A virtual device driver with suffix VXD.

16 Virtual Device Drivers
Virtual device drivers represent a particular variant of device drivers. They are used to emulate a hardware device, particularly in virtualization environments, for example when a DOS program is run on a Microsoft Windows computer or when a guest operating system is run on, for example,linux iis running virtually under windows. Instead of enabling the guest operating system to dialog with hardware, virtual device drivers take the opposite role and emulate a piece of hardware, so that the guest operating system and its drivers running inside a virtual machine can have the illusion of accessing real hardware. There are several variants of virtual device drivers, such as VxDs, VLMs, VDDs.

17 Device Drivers List Installed On A System…

18 Sound Driver Detail And Files Detail…

19 Questions???

20 That’s All…

21 Can You Imagine What I Would Do If I Could Do All I Can???


Download ppt "Device Driver Presented By: Syed Zulfiqar Ali Qurat Ul Ain Aslam"

Similar presentations


Ads by Google