0% found this document useful (0 votes)
12 views

Operating System

Micro project Of Operating System
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Operating System

Micro project Of Operating System
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Operating System(22516) Device Drivers In Operating System

Device Driver in Operating System

Operating System takes help from device drivers to handle all I/O devices. A device driver is a
computer program that operates or controls a particular device attached to a computer or
automaton. A driver provides a software interface to hardware devices, enabling operating
systems and other computer programs to access hardware functions without knowing precise
details about the hardware being used.

Device Drivers:
• Device Drivers are important for a computer system to work properly.
• Without a device driver, the particular hardware fails to work accordingly, which means
it fails in doing a particular action for which it has been created.
• Drivers are hardware-dependent and operating-system-specific. They usually provide
the interrupt handling required for any necessary asynchronous time-dependent
hardware interface.
• A driver communicates with the device through the computer bus or communications
subsystem to which the hardware connects.
• Once the device sends data back to the driver, the driver may invoke routines in the
original calling program. When a calling program invokes a driver's routine, the driver
issues the commands to the device.

Figure 1: Device Drivers

SSWP/IT/2024-25 P a g e 1 | 12
Operating System(22516) Device Drivers In Operating System

Device drivers encapsulate device-dependent code and implement a standard interface to


contain device-specific register reads or writes. A device driver is generally written by the
device's manufacturer and delivered along with the device on a CD-ROM. A device driver
performs the following jobs, such as:

o To accept request from the device-independent software above to it.

o Making sure that the request is executed successfully.

o Interact with the device controller to take and give I/O and perform required error
handling.

How Device Driver Handles a Request?


• How a device driver handles a request in the operating system is as follows:
• Suppose a request comes to read a block N.
• If the driver is idle when a request arrives, it starts carrying out the request immediately.
• Otherwise, if the driver is already busy with some other request, it places the new
request in the queue of pending requests.

Purpose of a Device Driver


• The main purpose of device drivers is to provide abstraction by acting as a translator
between a hardware device and the applications or operating systems that use it.
• Programmers can write higher-level application code independently of whatever
specific hardware the end-user is using.
• For example: a high-level application interacting with a serial port may have "send
data" and "receive data" functions.
• A device driver implementing these functions would communicate to the particular
serial port controller installed at a lower level on a user's computer.
• The commands needed to control a 16550 UART are different from those needed to
control an FTDI serial port converter.
• Still, each hardware-specific device driver abstracts these details into the same or
similar software interface.

SSWP/IT/2024-25 P a g e 2 | 12
Operating System(22516) Device Drivers In Operating System

How does Device Driver work?


• When you get a peripheral device such as a printer, scanner, keyboard or modem, the
device comes together with a driver CD which needs to be installed before the device
starts working.
• As soon we install the driver software into the computer, it detects and identifies the
peripheral device, and we become able to control it.
• A device driver is a piece of software that allows your computer's operating system to
communicate with a hardware device the driver is written for.
• Generally, a driver communicates with the device through the computer bus, which
connects the device with the computer.
• Device Drivers depend upon the Operating System's instruction to access the device
and performing any particular action.
• After the action, they also show their reactions by delivering output or message from
the hardware device to the Operating system.

Figure 2: Working Of Device Drivers

Device drivers work within the kernel layer of the operating system. The kernel is the part of
the operating system that directly interacts with the system's physical structure. Instead of
accessing a device directly, an operating system loads the device drivers and calls the specific
functions in the driver software to execute specific tasks on the device. Each driver contains
the device-specific codes required to carry out the actions on the device.

SSWP/IT/2024-25 P a g e 3 | 12
Operating System(22516) Device Drivers In Operating System

Types of Device Driver

For almost every device associated with the computer system, a Device Driver exists for the
particular hardware. But it can be broadly classified into the following two types, such as:

Figure 3: Types Of Device Drivers

1. Kernel-mode Device Driver

• This Kernel-mode device driver includes some generic hardware that loads with an
operating system as part of the OS.
• These are BIOS, motherboard, processor, and some other hardware that are part of
kernel software. These include the minimum system requirement device drivers for
each operating system.
• BIOS: BIOS (basic input/output system) is the most basic computer driver in
existence. It is designed to be the first program that boots when a PC turns on. The
BIOS is stored on memory built into the motherboard and is designed to boot the
hardware connected to the PC, including the hard drives, video display output, keyboard
and mouse.
• Motherboard Drivers: Motherboard drivers are small programs that are read by
either Windows or Linux and allow for basic computer functions while inside the
operating system. These drivers normally include programs that allow broadband ports,
USB ports and I/O ports for the mouse and keyboard. Depending on the making of the
motherboard, the drivers may also have basic drivers for video and audio support.
SSWP/IT/2024-25 P a g e 4 | 12
Operating System(22516) Device Drivers In Operating System

2. User-mode Device Driver


• Other than the devices brought by the kernel for working of the system, the user also
brings some devices for use during the using of a system that devices need device
drivers to functions those drivers fall under User mode device driver.
• For example: the user needs any plug and play action that comes under this.
Applications of Device Drivers:
• Because of the diversity of modern hardware and operating systems, drivers operate
in many different environments.
• Device drivers may interface with Printers, Video adapters, Network cards, Sound
cards, Local buses of various sorts, Image scanners, Digital cameras, Digital
terrestrial television tuners, IrDA adapters, and Implementing support for different file
systems. It also interfaces with:
• Low-bandwidth I/O buses of various sorts for pointing devices such as mice,
keyboards, etc.
• Computer storage devices such as hard disk, CD-ROM, and floppy disk buses (ATA,
SATA, SCSI, SAS)
• The radio-frequency communication transceiver adapters are used for short-distance
and low-rate wireless communication in home automation, such as Bluetooth Low
Energy (BLE), Thread, ZigBee, and Z-Wave).

Choosing and installing the correct device drivers for given hardware is often a key
component of computer system configuration. Common levels of abstraction for device
drivers include:

1. For hardware:

o Interfacing directly

o Writing to or reading from a device control register

o Using some higher-level interface (e.g. Video BIOS)

o Using another lower-level device driver (e.g. file system drivers using disk drivers)

o Simulating work with hardware while doing something entirely different.

SSWP/IT/2024-25 P a g e 5 | 12
Operating System(22516) Device Drivers In Operating System

2. For software:

o Allowing the operating system direct access to hardware resources

o Implementing only primitives

o Implementing an interface for non-driver software (e.g. TWAIN)

o Implementing a language, sometimes quite high-level (e.g. PostScript)

What is 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 a Xen host.
• Instead of enabling the guest operating system to dialogue with hardware, virtual
device drivers take the opposite role and emulates a piece of hardware.

Figure 4: Virtual Device Drivers

• The guest operating system and its drivers running inside a virtual machine can have
the illusion of accessing real hardware.
• Attempts by the guest operating system to access the hardware are routed to the
virtual device driver in the host operating system as function calls.
• The virtual device driver can also send simulated processor-level events like interrupts
into the virtual machine.

SSWP/IT/2024-25 P a g e 6 | 12
Operating System(22516) Device Drivers In Operating System

• Virtual devices may also operate in a non-virtualized environment. For example, a


virtual network adapter is used with a virtual private network, while a virtual disk
device is used with iSCSI.
• There are several variants of virtual device drivers, such as VxDs, VLMs, and VDDs.
A good example of a virtual device driver is the Daemon Tools.

Steps To install the Drivers of Devices:

1. Printer Installation steps:


Procedure:
1.1 Select a Printer Driver to Install.
There are many options such as Select Country/Region, Select Category, Product
name and Then We have to Select Language.

Figure 1.1: First Step For driver Installation

SSWP/IT/2024-25 P a g e 7 | 12
Operating System(22516) Device Drivers In Operating System

1.2 Download and Install a Printer Driver.

• Click the [Download] button and click the [Run] button on the opened window. If you
saved the file, then double-click it.
• Depending on your PC environment, sometime the file is automatically saved without
opening a window.

Figure 1.2: Second Step

SSWP/IT/2024-25 P a g e 8 | 12
Operating System(22516) Device Drivers In Operating System

1.3 Specify Where to Save the File.

Check where to save the file then click the [Next] button.

Figure 1.3: Third Step

1.4 Select Installation Method.

Figure 1.4: Fourth Step


SSWP/IT/2024-25 P a g e 9 | 12
Operating System(22516) Device Drivers In Operating System

1.5 Select a MFP to install.

Check the box of MFP to be installed and click the [Next] button. The printer drivers
displayed on this screen can be installed at the same time.

Figure 1.5: Fifth Step

1.6 Finish the Driver Installation.

SSWP/IT/2024-25 P a g e 10 | 12
Operating System(22516) Device Drivers In Operating System

Conclusion:
Device drivers play a crucial role in the functioning of computer systems. They ensure
compatibility between hardware and software, and virtual drivers extend this
functionality to virtualized environments. By understanding the different types of
device drivers and their role in system operation, you can better appreciate the
complexities of modern computing.

SSWP/IT/2024-25 P a g e 11 | 12
Operating System(22516) Device Drivers In Operating System

Reference:
• https://www.ninjaone.com/it-hub/remote-access/virtual-device-driver/
• https://www.geeksforgeeks.org/device-driver-and-its-purpose/

SSWP/IT/2024-25 P a g e 12 | 12

You might also like