0% found this document useful (0 votes)
8 views11 pages

COMPUTER ORGANIZATION (Unit-3)

The document discusses interrupts, detailing their types: hardware interrupts (internal and external) and software interrupts (normal and exception). It also explains Direct Memory Access (DMA) as a method for peripherals to communicate directly with memory, enhancing system performance. Additionally, it covers various I/O modes of transfer, including programmed I/O, interrupt-initiated I/O, and DMA, along with the functionalities of I/O interfaces and the types of computer buses.

Uploaded by

mounikasuvidham
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)
8 views11 pages

COMPUTER ORGANIZATION (Unit-3)

The document discusses interrupts, detailing their types: hardware interrupts (internal and external) and software interrupts (normal and exception). It also explains Direct Memory Access (DMA) as a method for peripherals to communicate directly with memory, enhancing system performance. Additionally, it covers various I/O modes of transfer, including programmed I/O, interrupt-initiated I/O, and DMA, along with the functionalities of I/O interfaces and the types of computer buses.

Uploaded by

mounikasuvidham
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/ 11

1. Discuss various types of interrupts.?

What is Interrupt?
Before interrupts, the CPU had to wait for the signal to process by continuously
checking for related hardware and software components (a method used earlier,
referred to as "polling"). This method expends CPU cycles waiting, reducing our
efficiency. The effective usage time of the CPU is reduced, reducing response time, and
there's also increased power consumption.
The solution proposed to the above problem was the use of interrupts. In this method,
instead of constantly checking for a signal, the CPU receives a signal from the hardware
or software components. The process of sending the signal by hardware or software
components is referred to as sending interrupts or interrupting the system.
The interrupts divert the CPU's attention to the signal request from the running process.
Once the interrupt signal is handled, the control is transferred back to the previous
process to continue from the exact position where it had left off.
Read About - Shift Registers in Digital Electronics
Types of interrupts
The interrupts are of two types:
1. Hardware interrupt
2. Software interrupt
Hardware Interrupt
Interrupts generated by the hardware are referred to as hardware interrupts. The failure
of hardware components and the completion of I/O can trigger hardware interrupts.
The two subtypes under it are:
1. Internal Interrupts
2. External Interrupts
Internal Interrupts
These interrupts occur when there is an error due to some instruction. For example,
overflows (register overflow), incorrect instructions code, etc.
These types of interrupts are commonly referred to as traps.
External Interrupts
These interrupts are the ones issued by hardware components, For example, when the
I/O process is completed data transfer, an infinite loop in the given code, power failure,
etc.
Software interrupt
As the name suggests, these interrupts are caused by software, mostly in user mode.
When a software interrupt occurs, the control is handed over to an interrupt handler (a
part of the Operating System). Termination of programs or requests of certain services
like the output to screen or using the printer can trigger it. These interrupts also have
higher priority than hardware interrupts.
There are two types of software interrupts:
• Normal Interrupts
• Exception Interrupts
• Normal Interrupts
These interrupts are caused by software instructions and are made intentionally.
Exception Interrupts
These interrupts are unplanned that occur during the execution of the program. An
example of this is the divide by zero exception.

2. Demonstrate the mechanism of DMA with diagram.?

A.Direct Memory Access:

Direct Memory Access (DMA) is a technique used in computers and other


electronic devices to allow peripherals (like hard drives, network cards, and sound
cards) to communicate directly with the main memory (RAM) without involving the
CPU. This process speeds up data transfer and frees up the CPU to perform other
tasks, improving overall system performance.

The peripheral device sends a request to the DMA controller to initiate a data
transfer.

The DMA controller takes control of the system’s memory bus and accesses
memory directly, either reading data from it or writing data to it.

After the transfer is complete, the DMA controller signals the CPU that the task is
finished, and the CPU can continue with other tasks.
Working of DMA Transfer

Below diagram represents a Direct Memory Access (DMA) controller and its
components in a typical DMA system.

DMA Controller Components


1. Control Logic: The Control Logic is the central component that
manages the overall DMA operation. It processes control signals and
directs data transfers between the peripherals and memory. It
receives commands from other components and determines how and
when data should be moved.
2. DMA Select and DMA Request: DMA Select is used by the DMA
controller to select the appropriate data transfer request. DMA
Request is initiated by a peripheral device when it needs to perform a
data transfer. The request tells the DMA controller that the device is
ready to either read or write data.
3. DMA Acknowledge: The DMA Acknowledge signal is sent back from
the control logic to the peripheral device to confirm that the DMA
operation has been initiated and the device can proceed with the data
transfer.
4. Bus Request and Bus Grant: Bus Request is generated by the DMA
controller when it needs access to the system's bus for data transfer.
The Bus Grant signal is sent from the CPU or the system’s bus
controller to give the DMA controller permission to use the bus for
transferring data.
5. Address Bus and Data Bus: The Address Bus and Data Bus are used
to transfer data and memory addresses between the DMA controller,
memory, and peripherals. The Data Bus Buffer temporarily holds data
being transferred, while the Address Bus Buffer holds memory
addresses.
6. Registers:
• Address Register: This stores the memory address where
data will be written or read from.
• Word Count Register: This keeps track of the number of
words or units of data that need to be transferred.
• Control Register: This contains control information,
including the direction of data transfer (read or write), and
any other control signals necessary to manage the DMA
operation.
7. Internal Bus: The Internal Bus connects all the components inside the
DMA controller, allowing them to communicate and pass data
efficiently.
8. Interrupt: The Interrupt signal is used to inform the CPU once the
DMA operation is completed. After the data has been transferred, the
DMA controller sends an interrupt to notify the CPU, so the CPU can
resume processing or handle other tasks.

3.Explain in detail various I/O modes of transfer.?

Overview of Input Output Interface

The Input-Output Interface is an essential component in computer systems. It enables


communication between the CPU and various external devices. These external devices are
peripherals like keyboards, monitors, printers, and storage devices such as hard drives,
network interfaces, etc.

Modes of Transfer
We store the binary information received through an external device in the memory unit.
The information transferred from the CPU to external devices originates from the memory
unit. Although the CPU processes the data, the target and source are always the memory
unit. We can transfer this information using three different modes of transfer.

Programmed I/O

Interrupt- initiated I/O

Direct memory access( DMA)

We will see each of them in detail in the upcoming sections.

1. Programmed I/O

Programmed I/O uses the I/O instructions written in the computer program. The
instructions in the program initiate every data item transfer. Usually, the data transfer is
from a memory and CPU register. This case requires constant monitoring by the peripheral
device’s CPU.

Advantages:

Programmed I/O is simple to implement.

It requires very little hardware support.

CPU checks status bits periodically.

Disadvantages:

The processor has to wait for a long time for the I/O module to be ready for either
transmission or reception of data.

The performance of the entire system is severely degraded.

2. Interrupt-initiated I/O
In the above section, we saw that the CPU is kept busy unnecessarily. We can avoid this
situation by using an interrupt-driven method for data transfer. The interrupt facilities and
special commands inform the interface for issuing an interrupt request signal as soon as
the data is available from any device. In the meantime, the CPU can execute other
programs, and the interface will keep monitoring the i/O device. Whenever it determines
that the device is ready for transferring data interface initiates an interrupt request signal to
the CPU. As soon as the CPU detects an external interrupt signal, it stops the program it
was already executing, branches to the service program to process the I/O transfer, and
returns to the program it was initially running.

Working of CPU in terms of interrupts:

CPU issues read command.

It starts executing other programs.

Check for interruptions at the end of each instruction cycle.

On interruptions:-

Process interrupt by fetching data and storing it.

See operation system notes.

Starts working on the program it was executing.

Advantages:

It is faster and more efficient than Programmed I/O.

It requires very little hardware support.

CPU does not check status bits periodically.

Disadvantages:

It can be tricky to implement if using a low-level language.

It can be tough to get various pieces of work well together.

The hardware manufacturer / OS maker usually implements it, e.g., Microsoft.

3. Direct Memory Access (DMA)

The data transfer between any fast storage media like a memory unit and a magnetic disk
gets limited with the speed of the CPU. Thus it will be best to allow the peripherals to
directly communicate with the storage using the memory buses by removing the
intervention of the CPU. This mode of transfer of data technique is known as Direct Memory
Access (DMA). During Direct Memory Access, the CPU is idle and has no control over the
memory buses. The DMA controller takes over the buses and directly manages data
transfer between the memory unit and I/O devices.

CPU Bus Signal for DMA transfer

Bus Request – We use bus requests in the DMA controller to ask the CPU to relinquish
the control buses.

Bus Grant – CPU activates bus grant to inform the DMA controller that DMA can take
control of the control buses. Once the control is taken, it can transfer data in many
ways.

4. . List the functionalities of I/O interface. Draw and explain a combined


input/output interface circuit?
A. Input-Output Interface is used as a method which helps in transferring of
information between the internal storage devices i.e. memory and the
external peripheral device . A peripheral device is that which provide
input and output for the computer, it is also called Input-Output devices.
For Example: A keyboard and mouse provide Input to the computer are
called input devices while a monitor and printer that provide output the
computer are called output devices. Just like the external hard-drives,
there is also availability of some peripheral devices which are able to
provide both input and output.

In micro-computer base system, the only purpose of peripheral devices is


just to provide special communication links for the interfacing them with
the CPU. To resolve the differences between peripheral devices and
CPU, there is a special need for communication links.

The major differences are as follows:


The nature of peripheral devices is electromagnetic and electro-
mechanical. The nature of the CPU is electronic. There is a lot of
difference in the mode of operation of both peripheral devices and CPU.
There is also a synchronization mechanism because the data transfer rate of
peripheral devices are slow than CPU.
In peripheral devices, data code and formats are differ from the format in the
CPU and memory.
The operating mode of peripheral devices are different and each may be
controlled so as not to disturb the operation of other peripheral devices
connected to CPU.
There is a special need of the additional hardware to resolve the differences
between CPU and peripheral devices to supervise and synchronize all input and
output devices.

Functions of Input-Output Interface:


It is used to synchronize the operating speed of CPU with respect to input-output
devices.
It selects the input-output device which is appropriate for the interpretation of the
input-output signal.
It is capable of providing signals like control and timing signals.
In this data buffering can be possible through data bus.
There are various error detectors.
It converts serial data into parallel data and vice-versa.
It also convert digital data into analog signal and vice-versa.

5. Explain about standard I/O interfaces.?


A.same as 4th question

6.Explain about I/O Bus?

A.What is a Computer Bus?

A bus is a set of physical connections (cables, circuits, etc.) that can be shared by
multiple hardware components to communicate with one another. Memory and input/
output devices are connected to the Central Processing Unit through a group of lines
called a bus. These lines are designed to transfer data between different
components.

Types of Computer Bus

Address Bus

Data Bus
Control Bus
1. Address Bus

A collection of wires used to identify particular location in main memory is called


Address Bus. Or in other words, the information used to describe the memory
locations travels along the address bus.

The address bus transports memory addresses which the processor wants to
access in order to read or write data..

The address bus is unidirectional.

The size of address bus determines how many unique memory locations can be
addressed.
Example:

A system with 4-bit address bus can address 24 = 16 Bytes of memory.

A system with 16-bit address bus can address 216 = 64 KB of memory

A system with 20-bit address bus can address 220 = 1 MB of memory.

2. Data Bus

A collection of wires through which data is transmitted from one part of a computer to
another is called Data Bus.

Data Bus can be thought of as a highway on which data travels within a computer.
The main objective of data bus is transfer of the data between microprocessor to
input/ output devices or memory.

The data bus transfers instructions coming from or going to the processor.

The data bus is bidirectional because the data can flow in either direction from CPU
to memory(or input/output device) or from memory to the CPU.

The size (width) of bus determines how much data can be transmitted at one time.

Example:

A 16-bit bus can transmit 16 bits of data at a time.

32-bit bus can transmit 32 bits at a time.

Control Bus

The connections that carry control information between the CPU and other devices
within the computer is called Control Bus.

The main objective of control bus is all signals controller carried from processor to
other hardware device.

The control bus transports orders and synchonisation signal coming from the control
unit and travelling to all other hardware components

The Control bus is bidirectional because the data can flow in either direction from
CPU to memory(or input/output device) or from memory to the CPU.

It also transmits response signals from the hardware.

Example:

This bus is used to indicate whether the CPU is reading from memory or writing to
memory.
The bus system is the important part of computer architecture which helps the
computer CPU to communicate efficiently with memory as well input/output
devices. The performance and reliability of a computer system is depending to
the design and implementation of the computer bus system is mentioned into the
points that we elaborate the importance of computing.

You might also like