0% found this document useful (0 votes)
37 views22 pages

Operating System Chapter 5 - MA

This document provides an overview of device management and discusses serial and parallel devices, buffering strategies, and direct memory access (DMA). The key points are: 1. Device management involves installing, configuring, and maintaining physical and virtual devices to ensure proper performance. 2. Serial transmission sends data bit-by-bit using clock pulses while parallel transmission sends multiple bits simultaneously. 3. Buffering strategies like single, double, and circular buffers temporarily store input/output data to smooth speed mismatches between devices and processors.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views22 pages

Operating System Chapter 5 - MA

This document provides an overview of device management and discusses serial and parallel devices, buffering strategies, and direct memory access (DMA). The key points are: 1. Device management involves installing, configuring, and maintaining physical and virtual devices to ensure proper performance. 2. Serial transmission sends data bit-by-bit using clock pulses while parallel transmission sends multiple bits simultaneously. 3. Buffering strategies like single, double, and circular buffers temporarily store input/output data to smooth speed mismatches between devices and processors.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 22

M.

A COLLEGE
ASSOSA CAMPUS

Department of Computer Science

Compiled by: Berhanu A.(MSc.) 1


Chapter Five: Device Management
Chapter contents

• Introduction

• Characteristics of serial and parallel devices

• Abstracting device differences

• Buffering strategies

• Direct memory access

• Recovery from failures


Introduction
• Device management is the process of managing the implementation, operation
and maintenance of a physical and/or virtual device.

• It is a broad term that includes various administrative tools and processes for the
maintenance and upkeep of a computing, network, mobile and/or virtual device.

• Device management generally performs the following:


o Installing device and component-level drivers and related software
o Configuring a device so it performs as expected using the bundled operating
system, business/workflow software and/or with other hardware devices.
o Implementing security measures and processes.
Continued

• Devices usually refer to physical/hardware devices such as computers,


laptops, servers, mobile phones and more. They could also be virtual,
however, such as virtual machines or virtual switches.

• In Windows, device management is also an administrative module


that is used for managing or configuring the physical devices, ports
and interfaces of a computer or server.
Characteristics of serial and parallel devices

• Serial Transmission:- In Serial Transmission, data is sent bit by bit


from one computer to another in bi-direction where each bit has its
clock pulse rate. Eight bits are transferred at a time having a start and
stop bit (usually known as a Parity bit), i.e. 0 and 1 respectively. For
transmitting data to a longer distance, serial data cables are used.
Continued
• Serial Transmission has two subclasses synchronous and
asynchronous.
o In asynchronous transmission, an extra bit is added to each byte so
that the receiver is alert about the arrival of new data. Usually, 0 is
a start bit, and 1 is the stop bit.
o In synchronous transmission, no extra bit is added rather the data
transferred in the form of frames which contains multiple bytes.
• The serial transmission system would not be able to work without
installing hardware at the sending and receiving.
• The hardware residing in the sending and receiving end is capable of
converting the data from the parallel mode (used in the device) to the
serial mode (used in the wires).
Parallel Transmission
• In Parallel Transmission, various bits are sent together simultaneously
with a single clock pulse. It is a fast way to transmit as it uses many
input/output lines for transferring the data. It is advantageous because
it conforms to the underlying hardware also, as the electronic devices
like computer and communication hardware uses parallel circuitry
internally. This is a reason the parallel interface complements the
internal hardware well.
Continued
• The installation and troubleshooting are easier in parallel transmission
system due to its placement in a single physical cable.

• Parallel Transmission uses a 25 pin port having 17 signal lines and 8


ground lines.

• The 17 signal lines are further divided as 4 lines that initiate


handshaking, Status lines used to communicate and notify errors and 8
to transfer data.

• For transferring data between computers, laptops, two methods are


used, namely, Serial Transmission and Parallel Transmission.
• There are some similarities and dissimilarities between them. In Serial
Transmission, data is sent bit by bit whereas, in Parallel Transmission a
byte (8 bits) or character is sent at a time. The similarity is that both are
used to connect and communicate with peripheral devices. The parallel
transmission is time-sensitive, whereas serial transmission is not time-
sensitive.

• Both Serial and Parallel Transmission have their advantages and


disadvantages. Parallel Transmission is used for a limited distance,
provides higher speed. Serial Transmission is reliable for transferring data
to longer distance. We conclude that both serial and parallel are
Buffering strategies
• Buffering:- In computer system when the speed in which data is
received and the speed in which data is processed are different, then
there we use the buffer.

• Buffer is a memory space which stores the input data and pass it on to
the system according to this speed in this way there is no need to hold
the input device until it is processed. The buffer can be of any type,
hardware or software, but in general software buffer are used widely.

• I/O buffering the process of temporarily storing data that is passing


between a processor and a peripheral. The usual purpose is to smooth out
I/O buffering and its Various Techniques
• A buffer is a memory area that stores data being transferred between
two devices or between a device and an application.
• Uses of I/O Buffering
• It is done to deal effectively with a speed mismatch between the producer and
consumer of the data stream.
• A buffer is produced in main memory to heap up the bytes received from modem.
• After receiving the data in the buffer, the data get transferred to disk from buffer in
a single operation.
• The use of two buffers disintegrates the producer and the consumer of the data,
thus minimizes the time requirements between them.
Types of various I/O buffering techniques
1. Single buffer:- A buffer is provided by the operating system to the
system portion of the main memory.
Block oriented device
• System buffer takes the input.
• After taking the input, the block gets transferred to the user space by
the process and then the process requests for another block.
• Two blocks work simultaneously, when one block of data is processed
by the user process, the next block is being read in.
• OS can swap the processes.
• OS can record the data of system buffer to user processes.
Continued
Stream oriented device
• Line- at a time operation is used for scroll made terminals. User
inputs one line at a time, with a carriage return signaling at the
end of a line.
• Byte-at a time operation is used on forms mode, terminals when
each keystroke is significant.
2. Double buffer

Block oriented:- There are two buffers in the system.


• One buffer is used by the driver or controller to store data while
 Other buffer is used to store data from the lower-level module.
 Double buffering is also known as buffer swapping.
 A major disadvantage of double buffering is that the complexity of the
process get increased.
 If the process performs rapid bursts of I/O, then using double buffering
may be deficient.
Stream oriented
• Line- at a time I/O, the user process need not be suspended for input or
output, unless process runs ahead of the double buffer.

• Byte- at a time operation, double buffer offers no advantage over a


single buffer of twice the length.
3. Circular buffer
• When more than two buffers are used, the collection of buffers is itself
referred to as a circular buffer.

• In this, the data do not directly pass from the producer to the consumer
because the data would change due to overwriting of buffers before
they had been consumed.
Direct memory access(DMA)
• DMA:-Many devices can temporarily take control of the bus and
perform data transfers to (and from) main memory or other devices.
Because the device is doing the work without the help of the CPU, this
type of data transfer is known as direct memory access.
• DMA transfers can be performed between two devices, between a
device and memory, or between memory and memory.
• Direct memory access is a method that allows an input/output (I/O)
device to send or receive data directly to or from the main memory,
bypassing the CPU to speed up memory operations.
• The process is managed by a chip known as a DMA controller
(DMAC).
• A defined portion of memory is used to send data directly from a
peripheral to the motherboard without involving the microprocessor,
so that the process does not interfere with overall computer operation.
Continued
• In older computers, four DMA channels were numbered 0, 1, 2 and 3.
When the 16-bit industry standard architecture (ISA) expansion bus
was introduced, channels 5, 6 and 7 were added.
• ISA was a computer bus standard for IBM-compatible computers,
allowing a device to initiate transactions (bus mastering) at a quicker
speed.
• The ISA DMA controller has 8 DMA channels, each one of which
associated with a 16-bit address and count registers.
• ISA has since been replaced by accelerated graphics port (AGP) and
peripheral component interconnect (PCI) expansion cards, which are
much faster. Each DMA transfers approximately 2 MB of data per
second.
• A computer’s system resource tools are used for communication
between hardware and software.
The four types of system resources

• I/O addresses

• Memory addresses

• Interrupt request numbers (IRQ)

• Direct memory access (DMA) channels

In burst mode, the system bus is released only after the data transfer is
completed. In cycle stealing mode, during the transfer of data between
the DMA channel and I/O device, the system bus is relinquished for a
few clock cycles so that the CPU can perform other tasks.
Continued
• When the data transfer is complete, the CPU receives an interrupt request
from the DMA controller.

• In transparent mode, the DMAC can take charge of the system bus only
when it is not required by the processor.

• However, using a DMA controller might cause cache coherency problems.


The data stored in RAM accessed by the DMA controller may not be updated
with the correct cache data if the CPU is using external memory. Solutions
include flushing cache lines before starting outgoing DMA transfers, or
performing a cache invalidation on incoming DMA transfers when external
writes are signaled to the cache controller.
Assignment Two(10%)

1. Write more description about recovery from failures(5pt)

2. Discuss the main difference between Detecting Failures and


recovery from failures(5pt)

You might also like