Open In App

Device Management in Operating System

Last Updated : 22 Feb, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

The process of implementation, operation, and maintenance of a device by an operating system is called device management. When we use computers we will have various devices connected to our system like mouse, keyboard, scanner, printer, and pen drives. So all these are the devices and the operating system acts as an interface that allows the users to communicate with these devices. An operating system is responsible for successfully establishing the connection between these devices and the system. The operating system uses the concept of drivers to establish a connection between these devices with the system.

What is Device Management?

Device Administration within An operating system controls every piece of hardware and virtual device on a PC or computer. Input/output devices are assigned to processes by the device management system based on their importance. Depending on the situation, these devices may also be temporarily or permanently reallocated.

Usually, systems are hardware or physical devices like computers, laptops, servers, cell phones, etc. Additionally, they might be virtual, like virtual switches or machines. A program may require a variety of computer resources (devices) to go through to the end. It is the operating system’s responsibility to allocate resources wisely. The operating system is alone in charge of determining if the resource is available. It deals not only with device allocation but also with deallocation, which means that a device or resource must be removed from a process once its use is over.

Functions of Device Management

  • Keeps track of all devices and the program that is responsible for performing this is called the I/O controller.
  • Monitoring the status of each device such as storage drivers, printers, and other peripheral devices.
  • Enforcing preset policies and making a decision on which process gets the device when and for how long.
  • Allocates and deallocates the device efficiently.

Types of Device Management

There are three main types of devices:

  • Boot Device: It stores information in a fixed-size block, each one with its own address. Example, disks.
  • Character Device: It delivers or accepts a stream of characters. the individual characters are not addressable. For example, printers, keyboards etc.
  • Network Device: It is for transmitting data packets.

Features of Device Management in Operating System

  • The operating system is responsible in managing device communication through their respective drivers.
  • The operating system keeps track of all devices by using a program known as an input-output controller.
  • It decides which process to assign to CPU and for how long.
  • O.S. is responsible in fulfilling the request of devices to access the process.
  • It connects the devices to various programs in an efficient way without error.
  • Deallocate devices when they are not in use.

Types of Devices

1. Dedicated Device

Certain devices are assigned to only one task at a time in device management until that task releases them. Plotters, printers, tape drives, and other similar devices require this kind of allocation method because sharing them with numerous users at the same time will be inconvenient. The drawback of these devices is the inefficiency that results from assigning the device to a single user throughout the entirety of the task execution process, even in cases when the device is not utilized exclusively.

2. Shared Device

There are numerous processes that these devices could be assigned to. Disk-DASD could be shared concurrently by many processes by interleaving their requests. All issues must be resolved by pre-established policies, and the Device Manager closely monitors the interleaving.

3. Virtual Device

Virtual devices are dedicated devices that have been converted into shared devices, making them a hybrid of the two types of devices. For instance, a spooling programme that routes all print requests to a disc can turn a printer into a sharing device. A print job is routed to the disc and not delivered straight to the printer until it is ready with all the necessary formatting and sequencing, at which time it is sent to the printers. The method can increase usability and performance by turning a single printer into a number of virtual printers.

What are the Various Techniques for Accessing a Device?

  • Polling: In this instance, a CPU keeps an eye on the status of the device to share data. Busy-waiting is a drawback, but simplicity is a plus. In this scenario, when an input/output operation is needed, the computer simply keeps track of the I/O device’s status until it’s ready, at which time it is accessed. Stated differently, the computer waits for the device to be ready.
  • Interrupt-Driven I/O: Notifying the associated driver of the device’s availability is the device controller’s job. One interrupt for each keyboard input results in slower data copying and movement for character devices, but the advantages include more effective use of CPU cycles. A block of bytes is created from a serial bit stream by a device controller. It also does error correction if needed. It consists of two primary parts: a data buffer that an operating system can read or write to, and device registers for communication with the CPU.
  • DMA(Direct Memory Access) : Data motions are carried out by using a second controller. This approach has the benefit of not requiring the CPU to duplicate data, but it also has the drawback of preventing a process from accessing data that is in transit.
  • Double Buffering: This mode of access has two buffers. One fills up while the other is utilised, and vice versa. In order to hide the line-by-line scanning from the viewer, this technique is frequently employed in animation and graphics.

Device Drivers

Operating system is responsible for managing device communication through their respective drivers. As we know that the operating system will have many devices like the mouse, printer, and scanner and operating system is responsible for managing these devices and establishing the communication between these devices with the computer through their respective drivers. So operating system uses its respective drivers each and every device will have its own driver. Without the use of their respective driver, that device cannot make communication with other systems.

Device Tracking

Operating system keeps track of all devices by using a program known as input output controller. Apart from allowing the system to make the communication between these drivers operating system is also responsible in keeping track all these devices which are connected with the system. If any device request any process which is under execution by the CPU then the operating system has to send a signal to the CPU to immediately release that process and moves to the next process from the main memory so that the process which is asked by the device fulfills the request of this device. That’s why operating system has to continuously keep on checking the status of all the devices and for doing that operating system uses a specialized program which is known as Input/Output controller.

Process Assignment

Operating system decides which process to assign to CPU and for how long. So operating system is responsible in assigning the processes to the CPU and it is also responsible in selecting appropriate process from the main memory and setting up the time for that process like how long that process needs to get executed inside the CPU. Operating system is responsible in fulfilling the request of devices to access the process. If the printer requests for the process which is now getting executed by the CPU then it is the responsibility of the operating system to fulfill that request. So what operating system will do is it will tell the CPU that you need to immediately release that process which the device printer is asking for and assign it to the printer.

Connection

Operating system connects the devices to various programs in efficient way without error. So we use software to access these drivers because we cannot directly access to keyboard, mouse, printers, scanners, etc. We have to access these devices with the help of software. Operating system helps us in establishing an efficient connection with these devices with the help of various software applications without any error.

Device Allocation

Device allocation refers to the process of assigning specific devices to processes or users. It ensures that each process or user has exclusive access to the required devices or shares them efficiently without interference.

Device Deallocation

Operating system deallocates devices when they are no longer in use. When these drivers or devices are in use, they will be using certain space in the memory so it is the responsibility of the operating system to continuously keep checking which device is in use and which device is not in use so that it can release that device if we are no longer using that device.

Conclusion

  • The operating system’s device management feature controls every piece of hardware and virtual device on a PC or computer.
  • Based on priority, the device management system assigns input/output devices to the process. Depending on the situation, these devices may also be deallocated temporarily or permanently.
  • The driver acts as an intermediary between the operating system’s high-level programming language and the electrical impulses coming from the hardware.
  • Fundamental input/output devices **come in three varieties: Boot, Character, and Network Devices.
  • The operating system divides device management into three categories: virtual, shared, and dedicated devices.

Frequently Asked Question on Device Management – FAQs

What activities are involved in device management?

Device management services offer methods for data transfer, synchronization, deallocation, allocation, control, and setup that are depending on the device.

What are some of the common tasks of device management?

  • Keeping track of all devices and their status
  • Allocating devices to processes or users as requested
  • Deallocating devices when they are no longer needed or requested
  • Handling device errors and failures
  • Providing a uniform interface for different types of devices
  • Implementing device drivers and interrupt handlers

List some of the common challenges of device management?

  • Managing concurrent access to shared devices
  • Balancing performance and fairness among different users or processes
  • Supporting a wide range of devices with different characteristics and capabilities
  • Handling device dependencies and conflicts
  • Providing security and protection for devices and data

Name some of the common techniques used by device management?

  • Using device controllers or I/O controllers to communicate with devices
  • Using device queues or spooling to buffer requests for devices
  • Using device scheduling algorithms to determine the order of servicing requests
  • Using device drivers or modules to provide a standard interface for devices
  • Using interrupts or polling to detect device events or status changes.


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads