0% found this document useful (0 votes)
18 views36 pages

Manoharbhai Patel Institute of Engineering AND Technology

The document discusses the I/O system in computer architecture, covering programmed driven I/O, interrupt driven I/O, and direct memory access (DMA). It explains how these methods manage data transfer between the CPU and I/O devices, highlighting their advantages and disadvantages. Additionally, it provides a comparison between programmed and interrupt driven I/O, along with types of DMA and their functionalities.

Uploaded by

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

Manoharbhai Patel Institute of Engineering AND Technology

The document discusses the I/O system in computer architecture, covering programmed driven I/O, interrupt driven I/O, and direct memory access (DMA). It explains how these methods manage data transfer between the CPU and I/O devices, highlighting their advantages and disadvantages. Additionally, it provides a comparison between programmed and interrupt driven I/O, along with types of DMA and their functionalities.

Uploaded by

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

MANOHARBHAI PATEL INSTITUTE OF ENGINEERING

AND
TECHNOLOGY
Department of Computer Engineering
Presented By:
Mr. Swayam C. Mule Miss. Sakshi S. Raut
Mr. Sahil H. Bhowate Miss. Trusha S. Dongarwar
Mr. Ujjwal M. Ladse Miss. Ankita R. Akare

Subject :Computer Architecture and Organization

Topic: I/O System , Programmed Driven I/O , Interrupt Driven I/O , DMA

Guided by : Prof. Rakesh Jambhulkar Sir


OUR KEY COMPONENTS

 I/O System
Programmed Driven I/O

Interrupt Driven I/O

DMA(Direct Memory Access)


2
What Is System ?

3
What is System ?

• In Computer Architecture and Organization, a System is the


Integrated Combination of Hardware Components and
Software that work together to perform Computing Tasks.

4
Input and Output System

5
Input and Output System
 Any program, device, or operation that transfers data to or from a computing
system.

 The communication between a computer and its external devices.

 I/O devices are very important in the computer systems.

 They provide users the means of interacting with the system.

 So there is a separate I/O system devoted to handling the I/O


devices.
6
The different Components of
the I/O systems are −

I/O Hardware

I/O Application Interface

I/O Software

7
I/O Hardware

There are many I/O devices handled by the operating system such as
mouse, keyboard, disk drive etc.

 There are different device drivers that can be connected to the


operating system to handle a specific device.

 The device controller is an interface between the device and


the device driver.

8
A diagram to represent this is −

9
I/O Application Interface

The user applications can access all the I/O devices using the
device drivers, which are device specific codes.

The application layer sees a common interface for all the


devices.
 Most of the devices are either block I/O and character I/O devices.

 Block devices are accessed one block at a time whereas character


devices are accessed one character at a time.

10
This is illustrated using the below image −

11
I/O Software
 The I/O software contains the user level libraries and the kernel modules.

 The libraries provide the interface to the user program to perform


input and output.

 The kernel modules provides the device drivers that interact with
the device controllers.

12
 The I/O software should be device independent so that the programs can
be used for any I/O device without specifying it in advance.

 For example - A program that reads a file should be able the read the file
on a hard disk, floppy disk, CD-ROM etc. without having to change the
program each time.

13
Programmed Driven I/O

14
What is Programmed Driven I/O ?

Programmed I/O (PIO), also known as programmed input/output, is a method where the CPU
directly controls data transfer between itself and an I/O device, requiring the CPU to wait for
each I/O operation to complete before proceeding.

It is one of the simplest forms of I/O where the CPU has to do all the work. This technique is
called programmed I/O.

15
How Programmed I/O Works ?
 In PIO mode, the CPU executes a specific program that gives it direct control over the entire I/O operation. Here’s a
breakdown of the process:

1.The CPU issues a command to the I/O module


2.The CPU waits for the I/O operation to complete
3.The I/O module performs the requested action
4.The I/O module sets the appropriate bits in its status register
5.The CPU repeatedly checks the status register until the operation is complete

 This process requires significant CPU overhead, as the processor must not only configure the data transaction but also
transfer the data itself.

16
Programmed I/O basically works in these ways:

 CPU requests I/O operation

 I/O module performs operation

 I/O module sets status bits

 CPU checks status bits periodically

 I/O module does not inform CPU directly

 I/O module does not interrupt CPU

 CPU may wait or come back later

17
Advantages of Programmed-Driven I/O

1. Simple to implement: Minimal hardware support is needed.

2. Low cost: No need for complex I/O controllers.

3. Direct control: The CPU has full control over the I/O process

18
Disadvantages of Programmed-Driven I/O

1. Inefficient: CPU time is wasted checking I/O status.

2. High CPU usage: Reduces CPU availability for other tasks.

3. Slower performance: Compared to other I/O methods like DMA or interrupts.

19
Interrupt Driven I/O

20
WHAT IS INTERRUPT DRIVEN I/O ?

 Interrupt-driven I/O is a method where the CPU is notified by an interrupt when an I/O
device is ready, allowing the CPU to perform other tasks in the meantime.

 The interrupt-driven I/O involves the use of interrupt to exchange data between I/O and
memory.

21
 The figure shows you how with the help of interrupt I/O the data transfer is carried
out between memory and I/O.

 Though it is more efficient than programmed I/O still it wastes some of the
processor’s time.

 As the transfer of data from memory to the I/O module or from the I/O module to
memory passes through the processor.

22
TYPES OF INTERRUPTS

•Hardware Interrupts: Interrupts present in the hardware pins.

•Software Interrupts: These are the instructions used in the program whenever the required
functionality is needed.

•Vectored interrupts: These interrupts are associated with the static vector address.

•Non-vectored interrupts: These interrupts are associated with the dynamic vector address.

•Maskable Interrupts: These interrupts can be enabled or disabled explicitly.

23
•Non-maskable interrupts: These are always in the enabled state. we cannot disable them.

•External interrupts: Generated by external devices such as I/O.

•Internal interrupts: These devices are generated by the internal components of the
processor such as power failure, error instruction, temperature sensor, etc.

•Synchronous interrupts: These interrupts are controlled by the fixed time interval. All the
interval interrupts are called as synchronous interrupts.

•Asynchronous interrupts: These are initiated based on the feedback of previous instructions.
All the external interrupts are called as asynchronous interrupts.

24
Advantages of Interrupt-Driven I/O

1. Efficient CPU use: CPU can perform other tasks while waiting.

2. Faster response: Immediate handling of I/O requests.

3. No polling: Eliminates continuous status checking.

25
Disadvantages of interrupt-driven I/O

1. Complexity: Requires interrupt handling mechanisms.

2. Interrupt overhead: Can slow down the system with frequent interrupts.

3. Priority issues: Potential conflicts with multiple interrupts.

26
DMA
(Direct Memory Access)

27
What Is DMA ?

 The Full Form of DMA is Direct Memory Access.

 In modern computer systems, transferring data between input/output devices and memory
can be a slow process if the CPU is required to manage every step.

 To address this, a Direct Memory Access (DMA) Controller is utilized.

 A Direct Memory Access (DMA) Controller solves this by allowing I/O devices to transfer
data directly to memory, reducing CPU involvement.

28
 This increases system efficiency and speeds up data transfers, freeing the CPU to focus on
other tasks.

 DMA controller needs the same old circuits of an interface to communicate with the CPU
and Input/Output devices

 Data movement between devices and the computer is possible at a reduced cost for the CPU
through DMA.
 Instead of DMA, we have the Ultra DMA delivering up to a transfer rate of 33 MBps. Hard
disks with ultra DMA/33 operate in PIO-1, PIO-3, PIO-4, and multiword DMA-2 mode at
16.8 MBs.

29
BLOCK DIAGRAM OF DMA

The CPU sends a signal to the


DMA controller to start
transferring data, and it sets
up the addressing of the
system memory as well as the
read/write modes in the
process.
Steps in the Working of DMA:
1. DMA Request:
1. A peripheral device (e.g., hard disk, network adapter) requests data transfer by sending a DMA request (DREQ)
signal to the DMA controller (DMAC).

2. CPU Grants Control:


1. The CPU temporarily pauses its current operations and grants control of the system bus to the DMA controller by
sending a Bus Grant (BG) signal.

3. Data Transfer:
1. The DMA controller directly transfers data from the I/O device to memory (or vice versa) without CPU
intervention.
2. This happens in different modes of transfer:
1. Burst Mode: Transfers a complete block of data in one go.
2. Cycle Stealing Mode: Transfers one word per cycle, allowing CPU to work intermittently.
3. Transparent Mode: Transfers occur only when the CPU is idle.

4. Completion & CPU Notification:


1. Once the transfer is complete, the DMA controller sends an interrupt to the CPU.
2. The CPU resumes normal operation and processes the transferred data if needed.
31
Types of Direct Memory Access (DMA)

 There are four popular types of DMA.

•Single-Ended DMA

•Dual-Ended DMA

•Arbitrated-Ended DMA

•Interleaved DMA

32
Types of Direct Memory Access (DMA)

 Single-Ended DMA: Single-Ended DMA Controllers operate by reading and writing from a single memory address.
They are the simplest DMA.

 Dual-Ended DMA: Dual-Ended DMA controllers can read and write from two memory addresses. Dual-ended DMA is
more advanced than single-ended DMA.

 Arbitrated-Ended DMA: Arbitrated-Ended DMA works by reading and writing to several memory addresses. It is more
advanced than Dual-Ended DMA.

 Interleaved DMA: Interleaved DMA are those DMA that read from one memory address and write from another
memory address.

33
Differences
Programmed Driven I/O Interrupt Driven I/O
• CPU constantly checks the device status (polling). • Device sends an interrupt when it needs attention.
• CPU remains busy, even when the device is idle. • CPU performs other tasks until interrupted.
• Inefficient for high-speed data transfers • More efficient as CPU time is utilized better.
• Slower response time due to continuous checking. • Faster response time as CPU is notified only when
needed.
• Simple to implement but wastes CPU cycles. • More complex but improves system performance.
• Suitable for slow devices like basic I/O ports. • Suitable for high-speed devices like hard disks and
network cards.
• Used in early computing systems with simple • Common in modern systems for multitasking and
peripherals. efficiency.

34
References :

 https://www.geeksforgeeks.org

 https://www.w3school.org

 https://www.tutorialspoint.com

 https://www.louiewong.com

 https://systeme.io/website

35
THANK YOU

36

You might also like