Which of the following actions may update your linux device drivers? select the two that apply.

Device Driver in computing refers to a special kind of software program or a specific type of software application that controls a specific hardware device that enables different hardware devices to communicate with the computer’s Operating System. A device driver communicates with the computer hardware by computer subsystem or computer bus connected to the hardware. 

Device Drivers are essential for a computer system to work properly because without a device driver the particular hardware fails to work accordingly, which means it fails in doing the function/action it was created to do. Most use the term Driver, but some may say Hardware Driver, which also refers to the Device Driver. 

Which of the following actions may update your linux device drivers? select the two that apply.
 

Working of Device Driver: 

Device Drivers depend upon the Operating System’s instruction to access the device and perform any particular action. After the action, they also show their reactions by delivering output or status/message from the hardware device to the Operating system. For example, a printer driver tells the printer in which format to print after getting instruction from OS, similarly, A sound card driver is there due to which 1’s and 0’s data of the MP3 file is converted to audio signals and you enjoy the music. Card reader, controller, modem, network card, sound card, printer, video card, USB devices, RAM, Speakers, etc need Device Drivers to operate. 

The following figure illustrates the interaction between the user, OS, Device driver, and the devices: 

Which of the following actions may update your linux device drivers? select the two that apply.
 

Types of Device Driver: 

For almost every device associated with the computer system there exist a Device Driver for the particular hardware. But it can be broadly classified into two types i.e.,

  1. Kernel-mode Device Driver – 
    This Kernel-mode device driver includes some generic hardware that loads with the 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.
  2. User-mode Device Driver – 
    Other than the devices which are brought by the kernel for working the system the user also brings some devices for use during the using of a system that devices need device drivers to function those drivers fall under User mode device driver. For example, the user needs any plug-and-play action that comes under this.

Virtual Device Driver: 

There are also virtual device drivers(VxD), which manage the virtual device. Sometimes we use the same hardware virtually at that time virtual driver controls/manages the data flow from the different applications used by different users to the same hardware. 

It is essential for a computer to have the required device drivers for all its parts to keep the system running efficiently. Many device drivers are provided by manufacturers from the beginning and also we can later include any required device driver for our system.

Updates on Linux require a restart if they affect the kernel. Drivers are part of the kernel. It's sometimes possible to upgrade a driver on Linux without rebooting, but that doesn't happen often: the peripheral controller by the driver can't be in use during the update, and the new driver version has to be compatible with the running kernel.

Upgrading a driver to a running system where the peripheral controlled by the driver is in use requires that the old driver leaves the peripheral in a state that the new driver is able to start with. The old and new driver must manage the handover of connections from clients as well. This is doable but difficult; how difficult depends on what the driver is driving. For example, a filesystem update without unmounting the filesystem requires the handover of some very complex data structures but is easy to cope with on the hardware side (just flush the buffers before the update, and start over with an empty cache). Conversely, an input driver only has to transmit a list of open descriptors or the like on the client side, but the hardware side requires that the new driver know what state the peripheral is in and must be managed carefully not to lose events.

Updating a driver on a live system is a common practice during development on operating systems where drivers can be dynamically loaded and unloaded, but usually not while the peripheral is in use. Updating a driver in production is not commonly done on OSes like Linux and Windows; I suppose it does get done on high-availability systems that I'm not familiar with.

Some drivers are not in the kernel (for example FUSE filesystems). This makes it easy to update them without updating the rest of the system, but it still requires that the driver not be in use (e.g. instances of the FUSE filesystem have to be unmounted and mounted again to make use of the new driver version).

Linux does have mechanisms to upgrade the kernel without restarting: Ksplice, Kpatch, KGraft. This is technically difficult as the updated version has to be compatible with the old version to a large extent; in particular, its data structures have to have exactly the same binary layout. A few distributions offer this service for security updates. These features are not (yet?) available in the mainline Linux kernel. On a mainline Linux kernel, a driver can be updated only if it's loaded as a module and if the module can be unloaded and the new module is compatible with the running kernel.

What are the two types of drivers in Linux?

There are various types of drivers present in GNU/Linux such as Character, Block, Network and USB drivers. In this column, we will explore only character drivers. Character drivers are the most common drivers. They provide unbuffered, direct access to hardware devices.

What method does Linux use to load device drivers into the kernel?

Linux allows you to include device drivers at kernel build time via its configuration scripts. When these drivers are initialized at boot time they may not discover any hardware to control. Other drivers can be loaded as kernel modules when they are needed.

Where are device drivers in Linux?

In Linux, even the hardware devices are treated like ordinary files, which makes it easier for the software to interact with the device drivers. When a device is connected to the system, a device file is created in /dev directory.

Which of the following are functions of a device driver?

Device drivers relay requests for device access and actions from the operating system and its active applications to their respective hardware devices. They also deliver outputs or status/messages from the hardware devices to the operating system (and thence, to applications).