0% found this document useful (0 votes)
13 views30 pages

Chapter-4 - Device Managment

operating system

Uploaded by

Belete Siyum
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views30 pages

Chapter-4 - Device Managment

operating system

Uploaded by

Belete Siyum
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 30

1 Chapter 4:Device Management

Outline
2

► Introduction
► Characteristics of parallel and serial devices
► Buffering strategies
► Direct memory access
► Recovery from failure
Introduction
3

Device management in OS
►Refers to the process of controlling and coordinating the

various hardware devices connected to a computer system


► This includes managing I/O devices
 Keyboards, monitors, printers, storage devices, and
other peripherals
► The primary goal
 To ensure efficient and reliable communication b\n the

OS and the hardware devices, allowing for seamless data


transfer and interaction.
Device management : Importance
4

Efficient device management crucial for several reasons:


I.Resource Allocation
► CPU, memory, and I/O devices are allocated efficiently.
► Prevent conflicts

► Each device receives the necessary resources

II.System Stability
► Maintain system stability by coordinating the interaction
between the OS and hardware devices
► This includes

 Handling device interrupts


 Managing I/O operations
 Devices operate in a synchronized manner.
Device management : Importance
5

III. Performance Optimization


► To improved system performance.
IV. User Experience
► Contribute to a seamless user experience.
► Users expect HW devices to work reliably and efficiently.

► Peripherals such as printers, monitors, and storage devices

function as expected.
Device management : Importance
6

V. Security
► Controlling access to hardware resources
► Preventing unauthorized access or tampering with devices.
VI. Compatibility and Interoperability
► HW devices are compatible with the OS and can
interoperate effectively
► This is essential for supporting a wide range of peripherals
Characteristics of parallel and serial device
7

A. Parallel Devices
Simultaneous data transmission
► Can transmit multiple bits of data simultaneously over

multiple lines or channels.


► This allows for faster data transfer rates

► More susceptible to signal interference due to the

simultaneous transmission of data


Wide data bus
► Each bit of data transmitted across a separate line.

► For example, a 8-bit parallel port uses 8 lines to

transmit 8 bits of data simultaneously.


Characteristics of parallel and serial device
8

Shorter cable length


► To prevent signal degradation and timing issues.

Common applications
► Parallel interfaces are commonly used for connecting

printers, external hard drives, and other high-speed


peripherals that require fast data transfer rates.
Advantages
► Faster data transfer: due to the simultaneous
transmission of multiple bits.
► High throughput: parallel interface allows for high

throughput
Characteristics of parallel and serial device
9

► Simultaneous operations: parallel devices can perform


multiple operations concurrently
Disadvantages
► Cable length limitation: due to signal degradation and

timing issues that can occur over longer distances.


► Hardware complexity: The need for a wider data bus

and more complex hardware increases the cost and


complexity of parallel devices.
► Signal Interference: more susceptible to signal
interference and crosstalk.
Characteristics of parallel and serial device
10

B. Serial Devices
Sequential data transmission
►Transmit data sequentially, one bit at a time, over a

single communication channel.


►Slower data transfer rates compared to parallel devices.

Single data line


►Use a single data line for transmitting and receiving data

►Simplifies the hardware requirements for the interface


Characteristics of parallel and serial device
11

Longer cable length


► Support longer cable lengths compared to parallel devices
► suitable for long-distance communication.
Common Applications
► Serial interfaces are commonly used for connecting modems,
mice, keyboards, networking equipment, and other peripherals
that do not require high-speed data transfer.
Advantages
► Longer cable lengths: support longer cable lengths without
experiencing significant signal degradation
Characteristics of parallel and serial device
12

Simplified hardware: require less complex hardware,


leading to lower cost and reduced design complexity.


► Reduced interference: less susceptible to signal
interference
Disadvantages
► Slower data transfer: slower data transfer rates
compared to parallel devices.
► Lower throughput: The sequential nature of data

transmission limits the throughput of serial devices


► Limited simultaneous operations: Serial devices may not

be as efficient for applications that require concurrent


data processing
Buffering strategies
13

Definition
►Buffering refers to the temporary storage of data in a

buffer
► Buffer is a region of memory used to temporarily hold

data while it is being transferred from one location to


another
►In device management, buffering plays a crucial role in

managing the flow of data between devices, such as


► I/O devices and the system's memory or storage.
Buffering strategies: types
14

I. Input Buffering
► Involves temporarily storing incoming data from an input

device before it is processed by the system.


► This allows the system to handle data at a consistent rate

II. Output Buffering


► Involves temporarily storing data that is being sent to an

output device
III. Double Buffering:
► It involves using two buffers to manage the display of

graphics or video
Buffering strategies: types
15

► One buffer being displayed while the other is being


updated
► This helps to eliminate flickering and tearing in visual
output
► Used in graphics and multimedia applications to
improve performance and prevent visual artifacts
IV. Circular Buffering
► Also known as a ring buffer
► Used to efficiently manage a fixed-size buffer
► When it reaches its capacity, allowing new data to
overwrite old data in a circular fashion.
Buffering strategies: types
16

V. Adaptive Buffering
► It is a dynamic buffering strategy that adjusts the size
of the buffer based on changing conditions
► Conditions include :
 Network congestion or fluctuations in data transfer
rates.
► Advantages
► optimize data transfer and
► minimize latency by adapting the buffer size to
match the current environment
Benefits of buffering
17

Buffering in device management offers several benefits,


including:
I.Smoothing data flow
► smooth out variations in data transfer rates between
devices and system
► Particularly useful when
 Devices that generate data at irregular intervals
 When the processing speed of the system and the
device do not match.
Benefits of buffering
18

II. Minimizing latency


► Allowing the system to process data at its own pace,
► Independent arrival of data from the device.
III. Handling bursty data
► Particularly useful
 Devices generate large amounts of data, such as in
multimedia streaming or network communication.
IV. Synchronization of Devices
► This is essential for maintaining the integrity of the
data and preventing data loss or corruption.
Benefits of buffering
19

II. Performance optimization


► Allowing the system to manage data transfer more
efficiently
III. Error Handling
► Retransmitting data in case of transmission failures
or interruptions.
► This helps to improve the reliability and robustness
of data transfer between devices and the system.
Direct Memory Access (DMA)
20

► DMA is a technique used in computer systems to


facilitate efficient data transfers between peripherals and
the system's memory without involving the CPU.
► DMA allows the peripherals to directly access the
system's memory for read and write operations,
bypassing the CPU
 This improving overall system performance
Examples of devices that utilize DMA
21

I. Storage Devices
► HDD, SSD, and optical drives often use DMA
 To transfer data between the storage device and
system memory
 This enables to allowing for fast and efficient read
and write operations.
II. NICs
► To transfer data packets to and from system memory
during network communication
► Enabling high-speed data transmission without
burdening the CPU with every packet transfer
Examples of devices that utilize DMA
22

III.Graphics Cards
► To transfer large amounts of graphical data between
the GPU's memory and system memory
► Enabling smooth rendering and high-performance
graphics processing
IV. Sound Cards
► To transfer audio data to and from system memory
► Enabling the playback and recording of high-quality
audio without requiring constant CPU involvement
Examples of devices that utilize DMA
23

V. Peripheral Controllers
► To efficiently manage
data transfers
between connected
devices and system
memory
Examples of devices that utilize DMA
24

VI. RAID Controllers


► Stands for Redundant Array of Independent Disks
► Use to optimize data transfer between multiple storage
drives in a RAID array
► Enhancing performance and fault tolerance without
relying heavily on the CPU for data management
Recovery from failure
25

► Recovery from failure is an essential to ensuring the


reliability and stability of computer systems
► When a device encounters a failure, it can disrupt
system operations and lead to data loss
► There are various mechanisms and strategies are used
to facilitate recovery from device failures
► Some common approaches to recovery from failure in
device management as follows
Recovery from failure: Common approaches
26

I. Redundancy
► Implementing redundant devices
► E.g. using RAID configurations for storage devices
► RAID allows data redundancy and fault tolerance enabling
recovery from disk failures without data loss.
II. Error Detection and Correction
► Error detection and correction mechanisms:
 Checksums, parity bits, and error-correcting codes, helps
identify and correct errors that occur during data transfer
Recovery from failure: Common approaches
27

III.Hot Swapping
► the replacement of a failed component without shutting
down the entire system
► Commonly found in storage devices, NICs, and other
peripherals
IV. Failover and Load Balancing
► Failover is the ability of switching to a reliable backup
system seamlessly and automatically
► Failover and load balancing mechanisms in network
devices, enables automatic rerouting of traffic in the
event of a device failure.
Recovery from failure: Common approaches
28

V. Device Monitoring and Alerting


► Implementing monitoring tools
► Continuously monitor device health and performance
► Alerts and notifications prompts to administrators to
take corrective actions before a failure occurs
VI. Automatic Recovery Procedures
► Utilizing automated recovery procedures, such as
 Automatic restarts
 Reinitialization of devices
 Failover to backup systems
Recovery from failure: Common approaches
29

VII. Data Backup and Recovery


► Regularly backing up critical data
► Implementing robust data recovery mechanisms, such as
 Snapshotting
 Replication
► Backup strategies helps to restore when the event of a
device failure or data loss occurs
30

r 4
p te
ha
o f C
d
En

You might also like