0% found this document useful (0 votes)
195 views17 pages

Session - 39 - Programmed Interrupt Driven IO

The document discusses programmed I/O and interrupt driven I/O. Programmed I/O involves the CPU initiating data transfers through instructions, while interrupt driven I/O uses interrupts to signal the CPU when a device is ready to transfer data.
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)
195 views17 pages

Session - 39 - Programmed Interrupt Driven IO

The document discusses programmed I/O and interrupt driven I/O. Programmed I/O involves the CPU initiating data transfers through instructions, while interrupt driven I/O uses interrupts to signal the CPU when a device is ready to transfer data.
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/ 17

Department of BES-II

Digital Design and Computer Architecture


23EC1202
Topic:
Programmed IO, Interrupt driven IO

Session No: 39
AIM OF THE SESSION

To familiarize students with the basic concept of Programmed IO, Interrupt driven IO.

INSTRUCTIONAL OBJECTIVES

This Session is designed to:


1. Demonstrate the Programmed IO, Interrupt driven IO
2. Describe the Programmed IO, Interrupt driven IO
3. List out the importance of Programmed IO, Interrupt driven IO

LEARNING OUTCOMES

At the end of this session, you should be able to:


1. Define the Programmed IO, Interrupt driven IO
2. Describe the Programmed IO, Interrupt driven IO
3. Summarize the Programmed IO, Interrupt driven IO
SESSION INTRODUCTION

Programmed I/O
• The programmed I/O was the simplest I/O technique for exchanging data or any communication
between the processor and the external devices.

• Data transfer is initiated through instructions stored in the computer program.

Interrupt Driven I/O


• The I/O transfer is initiated by the interrupt command issued to the CPU.

• There is no need for the CPU to stay in the loop as the interrupt command interrupts the CPU when
the device is ready for data transfer.
Programmed I/O

• With programmed I/O, data are exchanged between the processor and the I/O module. When the processor
issues a command to the I/O module, it must wait until the I/O operation is complete.
• The overall operation of the programmed I/O can be summaries as follow:
 The processor executes a program and encounters an instruction relating to I/O operation.
 The processor executes that instruction by issuing a command to the appropriate I/O module.
 The I/O module will perform the requested action based on the I/O command issued by the processor
(READ/WRITE) and set the appropriate bits in the I/O status register.
 The processor will periodically check the status of the I/O module until it finds that the operation is
complete
Programmed I/O (Cont..)

Execution of Programmed I/O input data transfer


Programmed I/O (Cont..)

Execution of Programmed I/O Output data transfer


Programmed I/O (Cont..)

Advantages of Programmed I/O


• Easy implementation
• Requires less hardware support

Disadvantages of Programmed I/O


• Busy waiting
• ties up CPU for long period with no useful work

7
Interrupt driven I/O

• Interrupt I/O is a way of controlling input/output activity whereby a peripheral or terminal that
needs to make or receive a data transfer sends a signal.
• This will cause a program interrupt to be set. At a time appropriate to the priority level of the I/O
interrupt.
Basic operations of interrupt-driven I/O
 CPU issues read command.
 I/O module gets data from peripheral whilst CPU does other work.
 I/O module interrupts CPU.
 CPU requests data.
 I/O module transfers data.
Interrupt driven I/O (Cont..)

Simple interrupt processing


Interrupt driven I/O (Cont..)

Interrupt processing
Interrupt driven I/O (Cont..)

Advantages of Interrupt driven I/O


• Fast
• Efficient

Disadvantages of Interrupt driven I/O


• Can be tricky to write if using a low level language
• Can be tough to get various pieces to work well together
• Usually done by the hardware manufacturer / OS maker, e.g. Microsoft

11
SUMMARY

• The programmed I/O was the simplest I/O technique for exchanging data or any communication
between the processor and the external devices. Data transfer is initiated through instructions
stored in the computer program.

• The I/O transfer is initiated by the interrupt command issued to the CPU. There is no need for the
CPU to stay in the loop as the interrupt command interrupts the CPU when the device is ready for
data transfer.
SELF-ASSESSMENT QUESTIONS

1. Disabling an interrupt is known as…

(a) Making
(b) run
(c) halt
(d) stop

2. Which hardware triggers some operations after certain program count?

(a) Programmable timer


(b) interrupt timer
(c) programmable interval timer
(d) None of these
SELF-ASSESSMENT QUESTIONS

3. In general two request lines are

(a) nonmaskable and maskable interrupt


(b) maskable interrupt
(c) nonmaskable interrupt
(d) blocked interrupt

4. The first instruction of bootstrap loader program of an operating system is stored in

(a) RAM
(b) Harddisk
(c) BIOS
(d) None of these
TERMINAL QUESTIONS

Long answer questions:

1. Examine the process of Programmed IO through the use of a block diagram and workflow.
2. Evaluate the benefits and drawbacks of Programmed I/O versus Interrupt-driven I/O.
3. Examine the process of interrupt driven IO through the use of a block diagram and workflow.
REFERENCES FOR FURTHER LEARNING OF THE SESSION

Reference Books:
1. Computer Organization by Carl Hamacher, Zvonko Vranesic and Saftwat Zaky.
2. Computer System Architecture by M. Morris Mano
3. Computer Organization and Architecture by William Stallings

Sites and Web links:


1. https://www.geeksforgeeks.org/difference-between-programmed-and-interrupt-initiated-i-o
THANK YOU

Team – Digital Design & Computer Architecture

You might also like