KEMBAR78
Module VI Input-Output Organization | PDF | Input/Output | Central Processing Unit
0% found this document useful (0 votes)
11 views9 pages

Module VI Input-Output Organization

The document covers Input-Output Organization in computer architecture, detailing concepts such as I/O modules, programmed I/O, interrupt-driven I/O, and Direct Memory Access (DMA). It includes definitions, comparisons, and the architecture of I/O systems, highlighting the roles of various components like device controllers and I/O channels. Additionally, it discusses the types of interrupts and their handling processes, as well as the differences between memory-mapped I/O and isolated I/O.
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)
11 views9 pages

Module VI Input-Output Organization

The document covers Input-Output Organization in computer architecture, detailing concepts such as I/O modules, programmed I/O, interrupt-driven I/O, and Direct Memory Access (DMA). It includes definitions, comparisons, and the architecture of I/O systems, highlighting the roles of various components like device controllers and I/O channels. Additionally, it discusses the types of interrupts and their handling processes, as well as the differences between memory-mapped I/O and isolated I/O.
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/ 9

MJ-3T: Computer Architecture

Module VI: Input-Output Organization

Prepared & Guided By : Souvik Chakraborty , M.Sc(C.S)

2-Mark Questions (Short Answer – 20 Questions)


1. What is an I/O module?
An I/O module is a hardware unit that connects the CPU and memory with peripheral
devices, handling data transfer and control signals between them.

2. Define programmed I/O.


Programmed I/O is a data transfer method where the CPU controls all aspects of I/O
operations through software instructions without external interrupts.

3. What is interrupt-driven I/O?


In interrupt-driven I/O, the CPU is interrupted when the I/O device is ready, allowing
better CPU utilization than programmed I/O.

4. What is Direct Memory Access (DMA)?


DMA is a technique that allows I/O devices to transfer data directly to/from memory
without involving the CPU.

5. Define I/O channel.


An I/O channel is a specialized processor used for handling I/O operations independently
from the CPU.

6. What are external devices?


External devices are peripheral components like keyboards, monitors, printers, or disk
drives connected to the computer system.

7. What is the role of a device controller?


A device controller manages the interface between a system’s I/O devices and the CPU,
sending and receiving data or control signals.

8. Differentiate between input and output devices.


Input devices send data to the computer (e.g., keyboard), while output devices receive
and display data from the computer (e.g., monitor).

9. What is a control bus in I/O?


The control bus carries control signals used to manage I/O operations such as read, write,
and interrupt requests.

1/9
10. Mention one advantage of DMA over interrupt-driven I/O.
DMA reduces CPU overhead during large data transfers by bypassing the CPU.

11. What is an interrupt vector?


An interrupt vector is a memory location or table that stores the address of an interrupt
service routine (ISR).

12. What is polling in I/O systems?


Polling is a technique where the CPU repeatedly checks the status of an I/O device to see
if it's ready for communication.

13. What is the role of an I/O interface?


An I/O interface facilitates communication between the CPU and peripheral devices.

14. Define synchronous data transfer.


Synchronous data transfer happens when data is transmitted at regular intervals,
synchronized by a clock signal.

15. Define asynchronous data transfer.


Asynchronous transfer occurs without a shared clock, using start and stop bits for
synchronization.

16. What is a buffer in I/O systems?


A buffer is a temporary memory area used to store data during I/O transfers to handle
speed mismatches.

17. Mention one function of an interrupt controller.


It prioritizes multiple interrupt requests and sends them to the CPU based on predefined
rules.

18. What is an interrupt service routine (ISR)?


ISR is a special function executed in response to an interrupt signal to handle the I/O
device.

19. Define I/O mapping.


I/O mapping is the method of assigning memory addresses to I/O devices for data access.

20. What is memory-mapped I/O?


In memory-mapped I/O, devices share the address space with memory, allowing standard
memory instructions to access I/O devices.

2/9
5-Mark Questions (Medium Answer – 10 Questions)
1. Differentiate between programmed I/O and interrupt-driven I/O.
o Programmed I/O: CPU polls device until it's ready; inefficient for large
operations.
o Interrupt-Driven I/O: Device interrupts CPU when ready; more efficient and
allows multitasking.

| Feature | Programmed I/O | Interrupt-Driven |


|----------------|----------------|------------------|
| CPU Involvement | High | Low |
| Efficiency | Low | High |
| CPU Utilization | Poor | Better |

2. Explain the concept and working of Direct Memory Access (DMA).


DMA allows peripherals to access main memory without CPU intervention.
o Steps:
1. CPU initializes DMA controller.
2. DMA controller transfers data directly.
3. After completion, DMA signals CPU via interrupt.
o Advantage: Frees CPU for other tasks.

3. Describe the structure and function of an I/O module.


I/O modules contain:
o Control Logic: Coordinates data transfer.
o Data Register: Temporary storage.
o Status Register: Indicates device readiness.
o Address Decoder: Identifies device addresses.
They manage communication between CPU, memory, and devices.

4. Explain the role of an I/O interface in computer systems.


The I/O interface ensures compatibility between the CPU and I/O devices through:
o Signal conversion
o Handshaking
o Data buffering
o Device control (using control and status signals)

5. Describe the steps in an interrupt-driven I/O operation.


1. CPU initiates I/O operation.
2. CPU continues other tasks.
3. I/O device finishes and sends an interrupt.
4. CPU halts current task, saves context.
5. Executes ISR.
6. Resumes previous task.

6. What are the functions of an I/O channel?

3/9
o Handles complex I/O tasks independently.
o Supports multiple I/O operations.
o Reduces CPU load.
o Performs error checking and data formatting.
o Example: Used in mainframes for parallel I/O.

7. Explain polling and its limitations.


o CPU repeatedly checks device status.
o Drawback: Wastes CPU time if device is idle.
o Suitable only for low-speed or non-critical I/O.
o Inefficient compared to interrupts or DMA.

8. Differentiate between memory-mapped I/O and isolated I/O.

Feature Memory-Mapped I/O Isolated I/O


Address Space Shared with memory Separate
Instruction Set Same as memory ops Special I/O instructions
Flexibility More flexible Limited

9. Explain synchronous vs. asynchronous data transfer.


o Synchronous: Data sent at regular intervals using a clock; faster but requires
clock matching.
o Asynchronous: Data sent with start/stop bits; more flexible but slower.

| Type | Clock | Speed | Complexity |


|-------------|-------|-------|------------|
| Synchronous | Yes | High | High |
| Async | No | Low | Low |

10. What are the types of interrupts in I/O systems?

 Hardware Interrupts: Triggered by devices (e.g., keyboard, mouse).


 Software Interrupts: Initiated by programs (e.g., system calls).
 Maskable/Non-Maskable:
o Maskable: Can be ignored.
o Non-maskable: High-priority, cannot be disabled (e.g., hardware failures).

4/9
1. Explain Programmed I/O, Interrupt-Driven I/O, and
Direct Memory Access (DMA) with comparisons.
🔹 Programmed I/O:

 In this method, the CPU continuously checks (polls) the I/O device status until it becomes ready
for data transfer.
 It wastes CPU time because the CPU remains idle while waiting.

Diagram:

CPU → I/O Device → Memory (CPU controls all steps)

Drawbacks:

 Inefficient
 CPU is tied up with I/O task

🔹 Interrupt-Driven I/O:

 The CPU starts the I/O operation and continues with other tasks.
 When the device is ready, it sends an interrupt signal to CPU.
 The CPU pauses, handles the interrupt via an Interrupt Service Routine (ISR), and then resumes
the previous task.

Advantages:

 Better CPU utilization


 Less busy waiting

🔹 Direct Memory Access (DMA):

 DMA controller manages data transfer directly between I/O device and memory.
 CPU is involved only in initiating and completing the process.

Steps:

1. CPU sets up the DMA controller with memory address, device address, data size.
2. DMA transfers data independently.
3. On completion, it raises an interrupt.

Diagram:

5/9
I/O Device ↔ DMA Controller ↔ Memory

CPU (only at start/end)

🔹 Comparison Table:
Feature Programmed I/O Interrupt I/O DMA

CPU Involvement High Moderate Low

Efficiency Low Moderate High

Use Case Simple peripherals Moderate data volume Large data transfers

Interrupt Usage No Yes Yes (only once complete)

2. Describe the architecture and working of an I/O module


with a diagram.
🔹 Components of I/O Module:

1. Data Register: Temporarily holds data during transfer.


2. Status/Control Register: Shows device readiness and control signals.
3. Address Decoder: Determines which device is being addressed.
4. Control Logic: Coordinates all internal module operations.
5. Interface Lines: Communicates with the device and the system bus.

Diagram:

┌────────────────────────────────────────┐
│ I/O Module │
│ ┌────────────┐ ┌────────────────────┐ │
│ │ Data Reg │ │ Control & Status │ │
│ └────────────┘ └────────────────────┘ │
│ ┌────────────┐ ┌────────────────────┐ │
│ │ Addr Dec. │ │ Control Logic │ │
│ └────────────┘ └────────────────────┘ │
└────────────────────────────────────────┘
↑↑↑↑ ↑↑↑↑
System Bus Peripheral Device

🔹 Working:

 The CPU sends address and control signals via the system bus.
 The I/O module decodes the address and checks the status.
 If ready, it performs data transfer between device and CPU/memory.

6/9
 Supports modes like:
o Programmed I/O
o Interrupt-Driven I/O
o DMA (if enabled)

3. Explain the types of interrupts and how they are handled


in a computer system.
🔹 Types of Interrupts:

1. Hardware Interrupts:
o Generated by external hardware (e.g., keyboard, mouse).
o Example: Keypress → Signal to CPU.
2. Software Interrupts:
o Triggered by programs using instructions (e.g., INT in x86).
o Used for system calls, exceptions.
3. Maskable Interrupts:
o Can be ignored/disabled by the CPU.
o Useful for non-critical devices.
4. Non-Maskable Interrupts (NMI):
o Cannot be ignored.
o Used for critical errors like hardware failures.

🔹 Interrupt Handling Process:

1. Device sends an interrupt request (IRQ) to the CPU.


2. CPU finishes current instruction.
3. CPU saves current context (PC, registers).
4. CPU identifies the interrupt vector (address of ISR).
5. Executes Interrupt Service Routine (ISR).
6. Restores saved state and resumes interrupted task.

Diagram:

Device Ready → IRQ → CPU → Save Context → ISR → Restore Context → Resume

7/9
4. Compare memory-mapped I/O and isolated I/O with
examples.
Feature Memory-Mapped I/O Isolated I/O (Port-Mapped)

Address Space Shares memory address space Separate I/O address space

Access Method Uses standard memory instructions Uses special I/O instructions (e.g., IN, OUT)

Number of Instructions Fewer (reuses memory instructions) More (additional I/O instructions)

Speed Faster, simpler programming Slightly slower

Example Instruction MOV AL, [PORT_ADDR] IN AL, 60h

Complexity Low High

🔹 Example:

 Memory-Mapped I/O:
Device at address 0xFFFF
CPU: MOV A, [0xFFFF]
 Isolated I/O:
Device port 60h
CPU: IN AL, 60h

5. Explain the role and architecture of an I/O channel. How


does it enhance system performance?
🔹 I/O Channel:

 A dedicated processor that offloads I/O responsibilities from the main CPU.
 Used in high-performance systems (e.g., mainframes).

🔹 Types:

1. Selector Channel:
o Handles one device at a time.
o Fast and simple.
2. Multiplexer Channel:
o Can handle multiple slower devices simultaneously.
3. Block Multiplexer Channel:
o Switches between devices for block-level I/O.

8/9
🔹 Architecture:

CPU ←→ Main Memory


↑ ↑
| |
↓ ↓
I/O Channel ←→ I/O Devices

 I/O channel acts as an intermediary.


 It handles device commands, data transfer, and error handling.

🔹 Benefits:

 Reduces CPU burden


 Allows overlapping of computation and I/O
 Enables parallelism in I/O operations
 Better throughput and responsiveness

XXXXX END XXXXX

9/9

You might also like