The document discusses input/output (I/O) organization in computers. It describes how the I/O subsystem provides communication between external devices and the central processing system. Common peripheral devices include monitors, keyboards, printers, and magnetic tapes. The document outlines different I/O techniques including programmed I/O, interrupt-driven I/O, and direct memory access. It also discusses I/O interfaces, addressing schemes, and how interrupts work to signal device completion.
Input/output modules are critical components that allow computers to interact with external devices. I/O modules serve as an interface between peripherals and the CPU/memory. They perform important functions like control and timing of data transfers, communication with the processor and devices, buffering data, and error detection. I/O modules connect to the system bus and contain data buffers, status registers, and logic to interact with the processor via control lines. This allows external devices like disks and tapes to connect indirectly to the computer and be managed through simple read/write commands.
Introduction to Object-Oriented Programming
Object-Oriented Programming (OOP) is a programming paradigm that organizes software design around data, or objects, rather than functions and logic. It is widely used for developing complex, scalable, and maintainable software systems. The core principles of OOP include encapsulation, abstraction, inheritance, and polymorphism.
Key Concepts of OOP
Encapsulation: This involves bundling data and methods that operate on that data within a single unit, called an object. It helps protect the internal state of an object from external interference23.
Abstraction: This principle focuses on exposing only necessary information while hiding complex details. It allows users to interact with objects without knowing their internal workings23.
Inheritance: This feature enables a new class (subclass) to inherit properties and behaviors from an existing class (superclass), promoting code reuse and hierarchical organization23.
Polymorphism: This allows objects of different classes to be treated as objects of a common superclass. It enables multiple behaviors to be implemented through a common interface23.
Object Technology and Programming Environment
Object Technology: This refers to the use of objects to model real-world entities in software development. It includes classes, objects, inheritance, polymorphism, and encapsulation7.
Programming Environment: OOP is typically supported in class-based languages like Java, Python, and C++. These environments provide tools for designing, developing, and testing object-oriented software
The document discusses input/output (I/O) problems in computer systems and solutions to those problems. Some key issues addressed are the variety of peripheral devices with different data rates and formats, and the mismatch between peripheral and processor speeds. The document describes I/O modules that interface between the CPU/memory and peripherals. I/O modules handle control, buffering, error detection and allow different I/O techniques like programmed I/O, interrupt-driven I/O and direct memory access (DMA) to transfer data efficiently.
The document discusses different methods of input/output (I/O) in computer systems. It describes three principal I/O techniques: programmed I/O, interrupt-driven I/O, and direct memory access. It also discusses I/O interfaces, peripherals, I/O modules, and how processors communicate with I/O modules using commands, addressing, and status signals. The document provides examples of common peripherals like keyboards, monitors, and disk drives and how they interface with I/O modules and exchange data with the processor.
This document discusses input/output organization and peripheral devices. It covers the following key points in 3 sentences:
Peripheral devices allow input and output between the computer and external environment. The document outlines different types of input devices, output devices, and input/output devices. It also discusses the input/output interface which provides communication between the CPU, memory, and peripheral devices by resolving differences in data formats, transfer rates, and operating modes.
This document discusses different techniques for data transfer between the CPU and I/O devices, including programmed I/O, interrupt-driven I/O, and direct memory access (DMA). It describes the basic functioning of an I/O module, comparing programmed I/O to interrupt-driven I/O. It then provides details on DMA, including how it allows high-speed transfer of data directly between memory and I/O devices without CPU involvement. The document also covers I/O interfaces, asynchronous data transfer methods like handshaking, and serial transmission techniques.
Hardware refers to the physical components of computers that can be touched and seen. This includes input devices like keyboards and mice and output devices like monitors and printers. The document then provides details about computer buses that connect hardware components and allow communication, different types of computer memory architectures, input/output techniques like port I/O and memory-mapped I/O, and direct memory access which allows hardware devices to access memory directly without using the CPU.
The document provides an overview of computer architecture and input/output techniques. It defines computer architecture as the set of instructions that describe a computer's organization and implementation. It discusses how I/O modules interface external devices like keyboards and printers to the CPU and memory. There are three main I/O techniques: programmed I/O where the CPU directly controls I/O, interrupt-driven I/O where devices interrupt the CPU when ready, and DMA where devices access memory independently of the CPU to improve efficiency. The document outlines the components and functioning of I/O modules and the various I/O commands used to control peripheral devices.
The document discusses input-output (I/O) modules in computers. It explains that I/O modules play a crucial role in allowing communication between a computer's central processing unit (CPU) and external devices. I/O modules connect devices to the computer's system bus and control the exchange of data between devices and main memory or the CPU. They help address issues like differing data formats and speeds between devices and the CPU. The document outlines various I/O techniques like programmed I/O, interrupt-driven I/O, and direct memory access (DMA) that use I/O modules to facilitate input and output.
A peripheral device provides input/output functions for a computer as an auxiliary device without core computing functionality. Peripheral devices are classified into input devices, output devices, and storage devices. An input/output interface helps transfer information between internal storage and external peripheral devices. It resolves differences in data formats and speeds between the CPU and peripheral devices. The interface provides control signals and buffers data to synchronize operations. Computers can use separate I/O and memory buses or a common bus with separate control lines or common control lines to communicate with peripherals and memory.
This document discusses different input/output techniques for computer systems. It describes three main I/O techniques: programmed I/O, interrupt-driven I/O, and direct memory access. Programmed I/O involves the CPU waiting for I/O operations to complete, interrupt-driven I/O uses interrupts to notify the CPU when an operation is done, and DMA allows data transfers without CPU involvement. The document also outlines functions of I/O modules, which connect I/O devices to system buses, and different addressing and mapping schemes for I/O devices.
The document discusses I/O hardware and operating system I/O subsystems. It covers principal of I/O hardware including device controllers and ports. It describes polling, I/O devices categories, direct memory access, and device controllers. The summary outlines the basic hardware elements for I/O, methods for moving data via programmed I/O or DMA, device drivers, system call interfaces, and kernel I/O subsystem services.
I/O ports allow connection between computers and peripheral devices like keyboards, mice and monitors. There are two main types of ports: serial ports which transmit data one bit at a time, and parallel ports which allow simultaneous transmission of multiple bits of data. Common ports include VGA, DVI, HDMI and USB. Device drivers act as an interface between the operating system and device controllers to allow communication between I/O devices and the CPU. There are three main I/O mechanisms: programmed I/O where the CPU directly controls I/O, interrupts where devices signal the CPU when ready, and DMA which allows hardware subsystems to access memory independently of the CPU.
I/o management and disk scheduling .pptxwebip34973
This document provides an overview of I/O management and disk scheduling in operating systems. It begins with an introduction to different categories of I/O devices and how they vary. It then covers techniques for performing I/O like programmed I/O, interrupt-driven I/O, and direct memory access. The document discusses the evolution of the I/O function and a hierarchical model for organizing I/O. It also outlines concepts like I/O buffering, disk scheduling parameters, RAID levels, and disk caching.
The document provides information about input/output management in operating systems. It discusses I/O devices, device controllers, direct memory access and DMA controllers. Some key points include:
I/O devices are divided into block devices which access fixed size blocks of data and character devices which access data as a sequential stream. Device controllers act as an interface between devices and device drivers. Direct memory access allows data transfer between memory and devices without CPU involvement by using a DMA controller. DMA controllers program data transfers and arbitrate bus access.
The document describes a distributed control system (DCS) used to control manufacturing processes. It discusses the key components of a DCS including CPUs, input/output modules, communication systems, and human interface systems. The DCS allows for distributed controllers throughout a system connected by networks for monitoring and control. Specific DCS applications are controlling electrical grids, chemical plants, oil refineries, and other continuous industrial processes.
The document discusses different methods of input/output (I/O) in computer systems. It describes three principal I/O techniques: programmed I/O, interrupt-driven I/O, and direct memory access. It also discusses I/O interfaces, peripherals, I/O modules, and how processors communicate with I/O modules using commands, addressing, and status signals. The document provides examples of common peripherals like keyboards, monitors, and disk drives and how they interface with I/O modules and exchange data with the processor.
This document discusses input/output organization and peripheral devices. It covers the following key points in 3 sentences:
Peripheral devices allow input and output between the computer and external environment. The document outlines different types of input devices, output devices, and input/output devices. It also discusses the input/output interface which provides communication between the CPU, memory, and peripheral devices by resolving differences in data formats, transfer rates, and operating modes.
This document discusses different techniques for data transfer between the CPU and I/O devices, including programmed I/O, interrupt-driven I/O, and direct memory access (DMA). It describes the basic functioning of an I/O module, comparing programmed I/O to interrupt-driven I/O. It then provides details on DMA, including how it allows high-speed transfer of data directly between memory and I/O devices without CPU involvement. The document also covers I/O interfaces, asynchronous data transfer methods like handshaking, and serial transmission techniques.
Hardware refers to the physical components of computers that can be touched and seen. This includes input devices like keyboards and mice and output devices like monitors and printers. The document then provides details about computer buses that connect hardware components and allow communication, different types of computer memory architectures, input/output techniques like port I/O and memory-mapped I/O, and direct memory access which allows hardware devices to access memory directly without using the CPU.
The document provides an overview of computer architecture and input/output techniques. It defines computer architecture as the set of instructions that describe a computer's organization and implementation. It discusses how I/O modules interface external devices like keyboards and printers to the CPU and memory. There are three main I/O techniques: programmed I/O where the CPU directly controls I/O, interrupt-driven I/O where devices interrupt the CPU when ready, and DMA where devices access memory independently of the CPU to improve efficiency. The document outlines the components and functioning of I/O modules and the various I/O commands used to control peripheral devices.
The document discusses input-output (I/O) modules in computers. It explains that I/O modules play a crucial role in allowing communication between a computer's central processing unit (CPU) and external devices. I/O modules connect devices to the computer's system bus and control the exchange of data between devices and main memory or the CPU. They help address issues like differing data formats and speeds between devices and the CPU. The document outlines various I/O techniques like programmed I/O, interrupt-driven I/O, and direct memory access (DMA) that use I/O modules to facilitate input and output.
A peripheral device provides input/output functions for a computer as an auxiliary device without core computing functionality. Peripheral devices are classified into input devices, output devices, and storage devices. An input/output interface helps transfer information between internal storage and external peripheral devices. It resolves differences in data formats and speeds between the CPU and peripheral devices. The interface provides control signals and buffers data to synchronize operations. Computers can use separate I/O and memory buses or a common bus with separate control lines or common control lines to communicate with peripherals and memory.
This document discusses different input/output techniques for computer systems. It describes three main I/O techniques: programmed I/O, interrupt-driven I/O, and direct memory access. Programmed I/O involves the CPU waiting for I/O operations to complete, interrupt-driven I/O uses interrupts to notify the CPU when an operation is done, and DMA allows data transfers without CPU involvement. The document also outlines functions of I/O modules, which connect I/O devices to system buses, and different addressing and mapping schemes for I/O devices.
The document discusses I/O hardware and operating system I/O subsystems. It covers principal of I/O hardware including device controllers and ports. It describes polling, I/O devices categories, direct memory access, and device controllers. The summary outlines the basic hardware elements for I/O, methods for moving data via programmed I/O or DMA, device drivers, system call interfaces, and kernel I/O subsystem services.
I/O ports allow connection between computers and peripheral devices like keyboards, mice and monitors. There are two main types of ports: serial ports which transmit data one bit at a time, and parallel ports which allow simultaneous transmission of multiple bits of data. Common ports include VGA, DVI, HDMI and USB. Device drivers act as an interface between the operating system and device controllers to allow communication between I/O devices and the CPU. There are three main I/O mechanisms: programmed I/O where the CPU directly controls I/O, interrupts where devices signal the CPU when ready, and DMA which allows hardware subsystems to access memory independently of the CPU.
I/o management and disk scheduling .pptxwebip34973
This document provides an overview of I/O management and disk scheduling in operating systems. It begins with an introduction to different categories of I/O devices and how they vary. It then covers techniques for performing I/O like programmed I/O, interrupt-driven I/O, and direct memory access. The document discusses the evolution of the I/O function and a hierarchical model for organizing I/O. It also outlines concepts like I/O buffering, disk scheduling parameters, RAID levels, and disk caching.
The document provides information about input/output management in operating systems. It discusses I/O devices, device controllers, direct memory access and DMA controllers. Some key points include:
I/O devices are divided into block devices which access fixed size blocks of data and character devices which access data as a sequential stream. Device controllers act as an interface between devices and device drivers. Direct memory access allows data transfer between memory and devices without CPU involvement by using a DMA controller. DMA controllers program data transfers and arbitrate bus access.
The document describes a distributed control system (DCS) used to control manufacturing processes. It discusses the key components of a DCS including CPUs, input/output modules, communication systems, and human interface systems. The DCS allows for distributed controllers throughout a system connected by networks for monitoring and control. Specific DCS applications are controlling electrical grids, chemical plants, oil refineries, and other continuous industrial processes.
This document discusses different memory addressing modes used in microprocessors, including real mode, protected mode, and flat mode addressing. It provides details on how addresses are calculated in real mode using segment registers and offsets. Protected mode addressing allows accessing memory above 1MB by using descriptor tables to map segment selectors to base addresses and limits. Various programming models for addressing program memory and stack memory are also covered.
Rock Art As a Source of Ancient Indian HistoryVirag Sontakke
This Presentation is prepared for Graduate Students. A presentation that provides basic information about the topic. Students should seek further information from the recommended books and articles. This presentation is only for students and purely for academic purposes. I took/copied the pictures/maps included in the presentation are from the internet. The presenter is thankful to them and herewith courtesy is given to all. This presentation is only for academic purposes.
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18Celine George
In this slide, we’ll discuss on how to clean your contacts using the Deduplication Menu in Odoo 18. Maintaining a clean and organized contact database is essential for effective business operations.
How to Configure Public Holidays & Mandatory Days in Odoo 18Celine George
In this slide, we’ll explore the steps to set up and manage Public Holidays and Mandatory Days in Odoo 18 effectively. Managing Public Holidays and Mandatory Days is essential for maintaining an organized and compliant work schedule in any organization.
*"Sensing the World: Insect Sensory Systems"*Arshad Shaikh
Insects' major sensory organs include compound eyes for vision, antennae for smell, taste, and touch, and ocelli for light detection, enabling navigation, food detection, and communication.
Ajanta Paintings: Study as a Source of HistoryVirag Sontakke
This Presentation is prepared for Graduate Students. A presentation that provides basic information about the topic. Students should seek further information from the recommended books and articles. This presentation is only for students and purely for academic purposes. I took/copied the pictures/maps included in the presentation are from the internet. The presenter is thankful to them and herewith courtesy is given to all. This presentation is only for academic purposes.
Search Matching Applicants in Odoo 18 - Odoo SlidesCeline George
The "Search Matching Applicants" feature in Odoo 18 is a powerful tool that helps recruiters find the most suitable candidates for job openings based on their qualifications and experience.
How to Create Kanban View in Odoo 18 - Odoo SlidesCeline George
The Kanban view in Odoo is a visual interface that organizes records into cards across columns, representing different stages of a process. It is used to manage tasks, workflows, or any categorized data, allowing users to easily track progress by moving cards between stages.
All About the 990 Unlocking Its Mysteries and Its Power.pdfTechSoup
In this webinar, nonprofit CPA Gregg S. Bossen shares some of the mysteries of the 990, IRS requirements — which form to file (990N, 990EZ, 990PF, or 990), and what it says about your organization, and how to leverage it to make your organization shine.
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabanifruinkamel7m
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
4. 4
Introduction
• In addition to the processor and a set of memory modules, the third
key element of a computer system is a set of I/O modules.
• Each I/O module interfaces to the system bus and controls one or
more peripherals (I/O devices).
• An I/O module not only wires a device into the system bus but also
contains logic for performing a communication function between the
peripheral and the bus.
• I/O function can be performed in cooperation with the processor and
memory called: ‘the internal I/O interface’, whereas the ‘external I/O
interface’ is between the I/O module and the outside world. (bridge)
5. 5
Why an I/O Module is Required?
• The peripherals are not connected directly to the system bus, the
reasons are as follows:
1. There are a wide variety of peripherals with various methods of
operation. It would be impractical to incorporate the necessary logic
within the processor to control a range of devices. (bulky μpr)
2. The data transfer rate of the peripherals is often much slower than
that of the memory or processor. Thus, it is impractical to use the
high-speed system bus to communicate directly with the peripheral.
3. Peripherals often use different data formats and word lengths than
the computer to which they are attached.
6. 6
Function of I/O Module
• An I/O module has two major
functions: (It provides data links
to I/O)
1. Interface to the processor and
memory via the system bus.
2. Interface to one or more
peripheral devices.
• Note: An external device
attaches to the computer by a
link to an I/O module. (I/O Devices)
The link is used to exchange control, status, and data between and I/O module and the ‘external device’. driver
7. 7
7.1 External Devices
• I/O external devices provide a means of exchanging data between
the external environment and the computer.
• An external device connected to an I/O module is often referred to as
a peripheral device or simply a peripheral. (e.g. keyboard, monitor)
Classification of external devices: are three:
1. Human readable: Suitable for communicating with the computer
user e.g. screen, printer, keyboard.
2. Machine readable: Suitable for communication with equipment e.g.
magnetic disk (controlled by I/O module).
3. Communication: Suitable for communicating with remote devices
e.g. modem, network interface card (NIC).
8. 8
An External Device
Transducer: An electrical device
that converts one form of signal
into another.
Buffer: is associated with the
Transducer to temporary hold
Data being transferred between
The I/O module and the external
Environment; a buffer size of 8 to
16 bits is common.
9. 9
• The interface to the I/O module is in the form of control, data and
status signals.
1. Control signals: determine the function that the device will
perform, such as send data to the I/O module (Input or Read),
accept data from the I/O module (Output or Write), report status,
or perform some control function. (e.g. position a disk head).
2. Data: are in the form of a set of bits to be sent or received from the
I/O module.
3. Status signals: indicate the state of the device e.g.
ready/busy/offline/error. (for data transfer)
Interface b/w the Device and the I/O Module
Active and passive devices.
10. 10
Keyboard/Monitor (Read)
• The most common means of computer/user interaction is a
keyboard / monitor arrangement.
• The user provides input through the keyboard.
• This input is then transmitted to the computer and may also be
displayed on the monitor.
• In addition, the monitor displays data provided by the computer.
• The basic unit of exchange is the character.
• Associated with each character is a code, typically 7 or 8 bits in length
• The most commonly used text code is the ASCII code.
11. 11
Types of Characters (Read)
• Each character in this code is represented by a unique 7-bit binary
code; thus, 128 different characters can be represented.
• Characters are of two types: printable and control.
• Printable characters are the alphabetic, numeric, and special
characters that can be printed on paper or displayed on a screen.
• Some of the control characters have to do with controlling the
printing or displaying of characters; an example is carriage return
(back space).
12. 12
Keyboard Input / Output (Read)
• For Keyboard input, when the user depresses a key, this generates an
electronic signal that is interpreted by the transducer in the keyboard
and translated into the bit pattern of the corresponding ASCII code.
• This bit pattern is then transmitted to the I/O module in the computer
• At the computer, the text can be stored in the same ASCII code.
• On Output, ASCII code characters are transmitted to an external
device from the I/O module.
• The transducer at the device interprets this code and sends the
required electronic signals to the output device either to display the
indicated character or perform the requested control function (print).
13. 13
Disk Drive (Skip)
• A ‘disk drive’ contains electronics for exchanging data, control, and
status signals with an I/O module plus the electronics for controlling
the disk read/write mechanism.
• A ‘moving-head disk’ must be able to cause the disk arm to move
radially in and out across the disk’s surface.
• The ‘transducer’, converts between the magnetic patterns on the
moving disk surface and bits in the device’s buffer.
(Break)
14. 14
7.2 I/O Modules
• I/O Module Function:
1. Control and timing.
2. Processor communication.
3. Device communication.
4. Data buffering.
5. Error detection.
15. 15
1. Control and Timing
• During any period of time, the processor may communicate with one
or more external devices in unpredictable patterns, depending on the
program’s need for I/O.
• The internal resources, such as main memory and the system bus,
must be shared among a number of activities, including data I/O.
• The I/O function includes control and timing requirement, to
coordinate the flow of traffic between internal resources and external
devices.
16. 16
2. Processor Communication
• The I/O module communicates with the processor in following ways:
• Command decoding: The I/O module accepts commands from the
processor, typically sent as signals on the control bus e.g. Read/Write.
• Data: Data are exchanged between the processor and the I/O module.
• Status reporting: Because peripherals are so slow, it is important to know
the status of the I/O module. Common status signals are Busy and Ready.
• E.g. if an I/O module is asked to send data to the processor (read), it may
not be ready to do so, because it is still working on the previous I/O
command. This fact can be reported with a ‘status signal’.
• Address recognition: Each I/O device has an address. Thus an I/O module
must recognize one unique address for each peripheral it controls.
17. 17
Module Function (Continued)
3. Device communication: The I/O module must be able to perform
device communication. This communication involves commands,
status information, and data.
4. Data buffering: Data coming from main memory are sent to an I/O
module in a rapid burst. The data are buffered in the I/O module
and then sent to the peripheral device at its ‘data rate’.
• In the opposite direction, the data are buffered so as not to tie up the
memory in a slow transfer operation.
5. Error detection: Finally, an I/O module is responsible for error
detection and for subsequently reporting errors to the processor.
E.g. paper jam, bad disk track, parity error etc.
18. 18
Steps for Transfer of Data from Device to CPU
• The control of the transfer of data from an external device to the
processor might involve the following sequence of steps:
1. The processor interrogates the I/O module to check the status of
the attached device.
2. The I/O module returns the device status.
3. If the device is operational and ready to transmit, the processor
requests the transfer of data, by means of a command to the I/O
module.
4. The I/O module obtains a unit of data (e.g. 8 or 16 bits) from the
external device.
5. The data are transferred from the I/O module to the processor.
19. 19
I/O Module Structure (Description Next Slide)
• I/O modules vary considerably in complexity and the number of
external devices that they control.
(Device-1)
(Device-2)
(Port-1)
(Port-2)
20. 20
I/O Module ‘Interfaces’ (Fig. Last Slide)
• The module connects to the rest of the computer through a set of ‘system-
bus’ lines.
• The data transferred to and from the module are buffered in one or more
‘data registers’.
• There may also be one or more ‘status’ registers that provide current status
information.
• The logic within the I/O module interacts with the processor via a set of
‘control’ lines. The CPU issues commands to I/O module via them.
• The module must be able to recognize and generate addresses associated
with the devices it controls.
• Finally, the I/O module contains logic specific to the interface with each
device it controls. (e.g. disk drive or printer)
21. 21
I/O Module (Generic term)
• An I/O module functions to allow the processor to view a wide range
of devices in a simple-minded way.
• The I/O module may hide the details of timing, data formats, and the
electro-mechanics of an external device, so that the processor can
function in terms of simple Read and Write commands.
• An I/O module that is quite primitive and requires detailed control is
usually referred to as an I/O controller or device controller.
• ‘I/O controllers’ are commonly seen on microcomputers.
• However, we will use the generic term, I/O module.
22. 22
I/O Commands (by CPU to I/O Module)
• To execute an I/O related instruction, the processor issues an address,
specifying the particular I/O module and external device, and an I/O
command.
• Types of I/O Commands: There are four types of I/O commands that an
I/O module may receive when it is addressed by a processor:
1) Control 2) Write 3) Read 4) Test
1. Control: command is used to activate a peripheral and tell it what to
do.
2. Write: causes the I/O module to take an item of data (byte or word)
from the data bus and then transmit the data item to the peripheral
23. 23
Types of I/O Commands (Continued)
3. Read: causes the I/O module to obtain an item of data from the
peripheral and place it in an internal buffer (data register).
• The processor can then obtain the data item by requesting that the
I/O module place it on the ‘data bus’.
4. Test: command is used to test various status conditions associated
with an I/O module and its peripherals.
• E.g. if the device is powered ON and Available for use.
• Processor will also want to know if the most recent I/O operation is
complete and if any errors occurred.
24. 24
1. Memory-Mapped I/O
• When the processor, main memory and I/O share a
common bus, two modes of addressing are possible:
1) Memory mapped I/O 2) Isolated I/O
1. With memory-mapped I/O, there is a single address space for
memory locations and I/O device addresses.
• The processor treats the status and data register of I/O modules as
memory locations and uses the same machine instruction to access
both memory and I/O devices. I/O data transfer is very like memory access.(CPU viewpoint)
• So, for example, with 10 address lines, a combined total of 210
= 1024
memory locations and I/O addresses can be supported.
Modes of Addressing I/O
25. 25
2. Isolated I/O
• With memory-mapped I/O, a single read line
and a single write line are needed on the bus.
2. Isolated I/O: The address space for I/O is isolated from that from
memory. (both memory and I/O use separate addressing space)
• The full range of addressing is available for both.
• Now, the command line specifies whether the address refers to a
memory location or an I/O device.
• Again with 10 address lines, the system may now support both 1024
memory locations and 1024 I/O addresses.
26. 26
Advantages & Disadvantages (Memory-mapped I/O)
• With Isolated I/O, the I/O ports are accessible only by special I/O
commands (less), which activate the I/O command lines on the bus.
• For most processor types, there is a relatively large set of different
instructions (more) for referencing memory.
• If Isolated I/O is used, there are only a few I/O instructions. (Dis-Adv)
• Thus an advantage of memory-mapped I/O is that, this large number
of instructions can be used, allowing more efficient programming.
• A disadvantage of memory-mapped I/O is that a valuable memory
address space is used up by I/O.
• Intel prefers isolated-I/O over memory-mapped I/O.
(Break)
27. 27
Input / Output Techniques
• The three techniques for
input of a block of data
are: (figure)
1) Programmed I/O
2) Interrupt-Driven I/O
3) Direct memory Access
(DMA)
Figure 7.4
Three techniques
For Input of a
Block of Data
28. 28
7.3 Programmed I/O (First Technique)
• With programmed I/O, the processor executes a program that gives it
direct control of the I/O operation, including sensing device status,
sending a read or write command, and transferring the data.
• When the processor issues a command to the I/O module, it must
wait until the I/O operation is complete.
• If the processor is faster than the I/O module, (and it usually is) then
this is wasteful of processor time. (Disadvantage)
29. 29
Overview of Programmed I/O
• When the processor is executing a program and encounters an instruction
relating to I/O, it executes that instruction by issuing a command to the
appropriate I/O module.
• With programmed I/O, the I/O module will perform the requested action and
then set the appropriate bits in the ‘I/O status register’.
• The I/O module takes no further action to alert the processor.
• In particular, it does not interrupt the processor. (to tell work is done)
• Thus, it is the responsibility of the processor to periodically check the status
of the I/O module until it finds that the operation is complete.
• This is the main disadvantage of programmed I/O, as a result the level of
performance of the system is severely degraded.
CPU waits for I/O module to complete operation, this Wastes CPU time. CPU is tied with I/O. (Disadvantage)
30. 30
Flowchart of Programmed I/O
• Figure gives an example of the use of programmed
I/O to read in a block of data from the peripheral
device into memory.
• Data are read in one word (e.g. 16 bits) at a time.
• For each word that is read in, the processor must
remain in a status-checking cycle until it
determines that the word is available in the I/O
module’s ‘data register’.
• The main disadvantage of programmed I/O
technique is that I/O is a time-consuming process
that keeps the processor busy needlessly.
31. 31
I/O Instructions (Executed by the CPU)
• With programmed I/O, there is a close correspondence between the
I/O related instructions that the processor fetches from memory and
the I/O commands that the processor issues to an I/O module to
execute the instructions.
• That is, the program instructions are easily mapped into I/O
commands, and there is often a simple one-to-one relationship.
• Typically, there will be many I/O devices connected through I/O
modules to the system bus.
• Each device is given a unique identifier or address.
• When the processor issues an I/O command, the command contains
the address of the desired device.
• Thus, each I/O module must interpret the address lines to determine
if the command is for itself.
32. 32
7.4 Interrupt-Driven I/O (Second Technique)
• The problem with programmed I/O, the processor has to wait, and
must repeatedly interrogate the status of the I/O module if it is ready
for either reception or transmission of data. (A big Disadvantage)
• As a result, the level of performance of system is severely degraded.
• With interrupt-driven I/O, the processor issues an ‘I/O command’,
continues to execute other instructions, and is interrupted by the I/O
module when it has completed its work. (and is ready to be serviced)
• With both programmed and interrupt I/O, the processor is
responsible for extracting data from main memory for output and
storing data in main memory for input.
• Interrupt I/O is better than programmed I/O, CPU does not wait.(Adv)
33. 33
How Interrupt-Driven I/O Works
• From the point of view of the ‘I/O module’
1. For input, the I/O module receives a read command from the
processor.
2. The I/O module then proceeds to read data in from required
peripheral.
3. Once the data are in the module’s ‘data register’, the module signals
an interrupt to the processor over a control line. (saying I’m ready)
4. The module then waits until its data are requested by the processor.
5. When the CPU requests, the module places data on the ‘data bus’.
34. 34
How Interrupt-Driven I/O Works
• From the point of view of the ‘processor’
1. For input, the processor issues a READ command.
2. It then goes off and does something else. (e.g. program execution)
3. At the end of each instruction cycle, the processor checks for interrupts.
4. When the interrupt from the I/O module occurs, the processor saves
the context of the current program and processes the interrupt. (e.g.
saving program counter and processor register)
5. The processor reads the word of data from the I/O module and stores it
in memory.
6. The processor then restores the context of the program it was working
on and resumes execution.
36. 36
Interrupt Processing
• The occurrence of an
interrupt triggers a number
of events, both in the
processor hardware and in
software.
• Figure shows a typical
sequence.
(ISR)
37. 37
Programmed I/O & Interrupt Driven I/O
• Drawbacks of Programmed and Interrupt-driven I/O
1. The I/O transfer rate is limited by the speed with which the
processor can test and service a device.
2. The processor is tied up in managing an I/O transfer; a number of
instructions must be executed for each I/O transfer.
• Advantages of Programmed and Interrupt-driven I/O
• Using these I/O techniques, the processor is dedicated to the task of
I/O and can move data at a rather higher rate. (manages resources)
38. 38
7.5 Direct Memory Access (DMA), 3rd
Technique
(DMA Function)
• In Direct memory access (DMA), the I/O
module and main-memory exchange data
directly, without processor involvement.
• DMA is an additional module on the system bus.
• The DMA module must force the processor to
suspend operation temporarily to gain control
over the system bus, which is needed for a data
transfer, directly between the I/O module and
main memory.
• This technique is called cycle stealing, because
the DMA module in effect steals a bus cycle.
39. 39
DMA Read or Write Operation
• When the processor wishes to read or write a block of data, it issues a
command to the DMA module, by sending the DMA module the
following information:
Whether a read or write is requested, using a read/write control line.
The address of the I/O device involved.
The starting location in memory to read from or write to.
The number of words to be read or written.
40. 40
DMA Read or Write Operation
1. After issuing a Read command to the DMA, the
processor then continues with other work.
2. The DMA module transfers the entire block of data, one word at a
time, directly to or from memory, without going through the
processor.
3. When the transfer is complete, the DMA module sends an interrupt
signal to the processor. (telling work done)
• Thus, the processor is involved only at the beginning and end of the
transfer.
41. 41
Review Questions (Chapter 07)
(Slide-7)
(Slide-14, 15, 17 & 18)
(Slide-27,28, 32 & 38)
(Slide-24 & 25)
(Slide-40)
(Slide-37)
(Slide-31, Red)
7.8 How ‘Interrupt Driven I/O’ works from the point of view of ‘I/O Module’? (Slide-33)
42. 42
Final Paper Pattern
• Total Marks = 50
• Short Questions (Preparatory Questions) = [3*10 = 30 Marks]
• Long Questions (Preparatory Questions) = [5*2 = 10 Marks]
• Numerical Problems (Examples + Problems) = [5*2 = 10 Marks]
• Chapters Included in Final-Term Course: Ch-4,Ch-7
• Chapter – 4: 40% Marks
• Chapter – 7: 30% Marks
• Chapter – 3: 20%, Chapter – 5: 10%
43. 43
Interrupt-Driven I/O (Design Issues)
• Two design issues arise in implementing interrupt I/O.
• First, because there are multiple I/O modules, how does the
processor determine which device issued the interrupt?
• Second, if multiple interrupts have occurred, how does the processor
decide which one to process?
• Four techniques serve to identify the I/O module & assign priorities:
1) Multiple interrupt lines 2) Software poll
3) Daisy chain (hardware poll, vectored)
4) Bus arbitration (vectored)
44. 44
1. Multiple interrupt lines between the processor and the I/O modules,
serve to identify the requesting I/O module. (Impractical)
2. Software poll: When the processor detects an interrupt, it branches to
an interrupt-service routine whose job is to poll each I/O module to
determine which module caused the interrupt.
3. Daisy chain: provides a ‘hardware poll’. When the processor senses an
interrupt, it sends out an ‘interrupt acknowledge’. This signal propagates
through a series of I/O modules until it gets to a requesting module.
• The requesting module places a word called vector, the processor uses the
vector as a pointer to the appropriate device-service routine.
4. Bus arbitration: an I/O module must first gain control of the bus before
it can raise the ‘interrupt request line’. Thus only one module can raise
the line at a time.