UNIT 5 OS
UNIT 5 OS
Device Controller
It is a hardware program mainly utilized to connect a computer's operating system and functions
in the phase by connecting the device driver. It is an electronic component that handles the link
between incoming and outgoing signals in a processor by using chips.
It serves as a link between a device and any program that can receive commands from the operating
system. These functions include buttons like reading, writing, etc. Every button and controller of
various types of controllers differs from one another, with differences based on how they are
utilized.
The device controller gets data from a connected system device and temporarily saves such data
in a special purpose register inside the controller known as a local buffer. There is a device driver
for every device controller. The memory is linked with the memory controller. The monitor is
linked with the video controller, and the keyword is linked with the keyboard controller. The disk
drive and USB drive are each attached to their respective disk controllers. These controllers are
linked to the processor through the common bus.
Interrupt handlers
An interrupt handler, also known as an interrupt service routine or ISR, is a piece of software or
more specifically a callback function in an operating system or more specifically in a device
driver, whose execution is triggered by the reception of an interrupt.
When the interrupt happens, the interrupt procedure does whatever it has to in order to handle the
interrupt, updates data structures and wakes up process that was waiting for an interrupt to
happen.
The interrupt mechanism accepts an address ─ a number that selects a specific interrupt handling
routine/function from a small set. In most architectures, this address is an offset stored in a table
called the interrupt vector table. This vector contains the memory addresses of specialized
interrupt handlers.
Now let's briefly describe all four input/output software layers that are listed above.
Interrupt Handlers
The interrupt procedure will perform whatever actions are necessary in order to deal with an
interrupt whenever one of those events takes place.
Device Drivers
Device drivers, in their most basic form, are device-specific codes that are used solely for the
purpose of controlling the input/output devices that are connected to a computer system.
The term "device drivers" is likely the most familiar to you out of the four layers described in
this post; in fact, you have probably come across it at some point. It is not possible to use a
device that is connected to a computer without the appropriate device driver. To give you an
example, let's say that in order to use our computer to browse the internet, we need to connect a
MODEM to it first. As a result, in order for our MODEM to work, the device driver that
corresponds to our MODEM needs to be installed on our computer. It is possible that the
MODEM will not work if its device driver is not installed.
Device-Independent Input/Output Software
Some of the input/output software is device-specific, and other parts of that input/output software
are device-independent.
The exact boundary between the device-independent software and drivers is device-dependent,
and just because of that, some functions that could be done in a device-independent way
sometimes are done in the drivers, for efficiency or any other reason.
Here is a list of some functions that are done in the device-independent software:
• Uniform interfacing for device drivers
• Buffering
• Error reporting
• Allocating and releasing dedicated devices
• Providing a device-independent block size
User-Space Input/Output Software
Generally, most of the input/output software is within the operating system (OS), and some small
part of that input/output software consists of libraries that are linked with the user programs and
even whole programs running outside the kernel.
There is rarely a situation where you should use RAID 0 in a server environment. You can use it
for cache or other purposes where speed is essential, and reliability or data loss does not matter at
all.
2. RAID 1 (mirrored disks)
It duplicates data across two disks in the array, providing full redundancy. Both disks are store
exactly the same data, at the same time, and at all times. Data is not lost as long as one disk
survives. The total capacity of the array equals the capacity of the smallest disk in the array. At
any given instant, the contents of both disks in the array are identical.
RAID 1 is capable of a much more complicated configuration. The point of RAID 1 is primarily
for redundancy. If you completely lose a drive, you can still stay up and running off the other
drive.
If either drive fails, you can then replace the broken drive with little to no downtime. RAID 1
also gives you the additional benefit of increased read performance, as data can read off any of
the drives in the array. The downsides are that you will have slightly higher write latency. Since
the data needs to be written to both drives in the array, you'll only have a single drive's available
capacity while needing two drives.
3. RAID 5(striped disks with single parity)
RAID 5 requires the use of at least three drives. It combines these disks to protect data against
loss of any one disk; the array's storage capacity is reduced by one disk. It strips data across
multiple drives to increase performance. But, it also adds the aspect of redundancy by
distributing parity information across the disks.