0% found this document useful (0 votes)
6 views

Archite ture notes

The document discusses the Instruction Pipeline and Input-Output Interface as essential components of computer architecture. It outlines the stages of instruction execution, the functions of I/O interfaces, and various modes of data transfer, including Programmed I/O, Interrupt-initiated I/O, and Direct Memory Access. Additionally, it explains the Memory Hierarchy, detailing different types of memory, their access speeds, and their roles in optimizing computer performance.

Uploaded by

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

Archite ture notes

The document discusses the Instruction Pipeline and Input-Output Interface as essential components of computer architecture. It outlines the stages of instruction execution, the functions of I/O interfaces, and various modes of data transfer, including Programmed I/O, Interrupt-initiated I/O, and Direct Memory Access. Additionally, it explains the Memory Hierarchy, detailing different types of memory, their access speeds, and their roles in optimizing computer performance.

Uploaded by

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

Instruction Pipeline:

An Instruction Pipeline is a key component of a processor's structure designed to


facilitate the concurrent execution of a couple of commands. It breaks down the
execution of instructions into different phases and while one phase of one
instruction is executed, other phase from other instruction can be started.

Components:

o Instruction Fetch (IF): The first stage entails fetching the instruction from
memory. The software program counter is used to decide the address of the
following approach.
o Instruction Decode (ID): In this phase, the fetched instruction is decoded to
determine the operation to be completed and to understand the operands
involved.
o Execution (EX): The actual computation or operation through the instruction
takes place in this stage. It might also additionally contain mathematics or logical
operations.
o Memory Access (MEM): If instruction requires access to memory, this stage is
wherein data is analyzed from or written to memory.
o Write Back (WB): The final phase includes registering the results once more to
report or memory and finishing the execution of these.
Advantages:

o Improved Throughput: The instruction pipeline allows for a continuous drift of


commands through the processor, enhancing the usual throughput. While one
instruction is within the execution phase, every other may be within the decoding
phase, resulting in better resource utilization.
o Faster Program Execution: By overlapping the execution of instructions, the time
taken to execute a series of commands is reduced. This outcome in faster
software execution is a vital element in enhancing the general performance of a
PC system.
o Effective Resource Management: Instructional pipelining allows powerful
manipulation of sources by permitting tremendous levels of the pipeline to
operate concurrently. This contributes to a good and streamlined execution of
commands.
I/O interface:

Introduction to Input-Output Interface

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 to 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:
1. 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.
2. There is also a synchronization mechanism because the data transfer rate
of peripheral devices are slow than CPU.
3. In peripheral devices, data code and formats are differ from the format in
the CPU and memory.
4. 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:
1. It is used to synchronize the operating speed of CPU with respect to input-
output devices.
2. It selects the input-output device which is appropriate for the interpretation
of the input-output signal.
3. It is capable of providing signals like control and timing signals.
4. In this data buffering can be possible through data bus.
5. There are various error detectors.
6. It converts serial data into parallel data and vice-versa.
7. It also convert digital data into analog signal and vice-versa.
Mode of Transfer:
The binary information that is received from an external device is usually stored in the
memory unit. The information that is transferred from the CPU to the external device is
originated from the memory unit. CPU merely processes the information but the
source and target is always the memory unit. Data transfer between CPU and the I/O
devices may be done in different modes. Data transfer to and from the peripherals
may be done in any of the three possible ways
1. Programmed I/O.
2. Interrupt- initiated I/O.
3. Direct memory access( DMA).
Now let’s discuss each mode one by one.
1. Programmed I/O: It is due to the result of the I/O instructions that are written in the
computer program. Each data item transfer is initiated by an instruction in the
program. Usually the transfer is from a CPU register and memory. In this case it
requires constant monitoring by the CPU of the peripheral devices.
Example of Programmed I/O: In this case, the I/O device does not have direct
access to the memory unit. A transfer from I/O device to memory requires the
execution of several instructions by the CPU, including an input instruction to
transfer the data from device to the CPU and store instruction to transfer the data
from CPU to memory. In programmed I/O, the CPU stays in the program loop until
the I/O unit indicates that it is ready for data transfer. This is a time consuming
process since it needlessly keeps the CPU busy. This situation can be avoided by
using an interrupt facility. This is discussed below.
2. Interrupt- initiated I/O: Since in the above case we saw the CPU is kept busy
unnecessarily. This situation can very well be avoided by using an interrupt driven
method for data transfer. By using interrupt facility and special commands to inform
the interface to issue an interrupt request signal whenever data is available from any
device. In the meantime the CPU can proceed for any other program execution. The
interface meanwhile keeps monitoring the device. Whenever it is determined that
the device is ready for data transfer it initiates an interrupt request signal to the
computer. Upon detection of an external interrupt signal the CPU stops momentarily
the task that it was already performing, branches to the service program to process
the I/O transfer, and then return to the task it was originally performing.
 The I/O transfer rate is limited by the speed with which the processor can test and
service a device.
 The processor is tied up in managing an I/O transfer; a number of instructions
must be executed for each I/O transfer.
 Terms:
o Hardware Interrupts: Interrupts present in the hardware pins.
o Software Interrupts: These are the instructions used in the program
whenever the required functionality is needed.
o Vectored interrupts: These interrupts are associated with the static vector
address.
o Non-vectored interrupts: These interrupts are associated with the
dynamic vector address.
o Maskable Interrupts: These interrupts can be enabled or disabled
explicitly.
o Non-maskable interrupts: These are always in the enabled state. we
cannot disable them.
o External interrupts: Generated by external devices such as I/O.
o Internal interrupts: These devices are generated by the internal
components of the processor such as power failure, error instruction,
temperature sensor, etc.
o Synchronous interrupts: These interrupts are controlled by the fixed time
interval. All the interval interrupts are called as synchronous interrupts.
o Asynchronous interrupts: These are initiated based on the feedback of
previous instructions. All the external interrupts are called as
asynchronous interrupts.
3. Direct Memory Access : The data transfer between a fast storage media such as
magnetic disk and memory unit is limited by the speed of the CPU. Thus we can
allow the peripherals directly communicate with each other using the memory buses,
removing the intervention of the CPU. This type of data transfer technique is known
as DMA or direct memory access. During DMA the CPU is idle and it has no control
over the memory buses. The DMA controller takes over the buses to manage the
transfer directly between the I/O devices and the memory unit.
 Bus grant request time.
 Transfer the entire block of data at transfer rate of device because the device is
usually slow than the speed at which the data can be transferred to CPU.
 Release the control of the bus back to CPU So, total time taken to transfer the N
bytes = Bus grant request time + (N) * (memory transfer rate) + Bus release
control time.
4. Buffer the byte into the buffer
5. Inform the CPU that the device has 1 byte to transfer (i.e. bus grant request)
6. Transfer the byte (at system bus speed)
7. Release the control of the bus back to CPU.
Advantages:
Standardization: I/O interfaces provide a standard way of communicating with
external devices. This means that different devices can be connected to a computer
using the same interface, which makes it easier to swap out devices and reduces the
need for specialized hardware.
Modularity: With I/O interfaces, different devices can be added or removed from a
computer without affecting the other components. This makes it easier to upgrade or
replace a faulty device without affecting the rest of the system.
Efficiency: I/O interfaces can transfer data between the computer and the external
devices at high speeds, which allows for faster data transfer and processing times.
Compatibility: I/O interfaces are designed to be compatible with a wide range of
devices, which means that users can choose from a variety of devices that are
compatible with their computer’s I/O interface.

Disadvantages:
Cost: I/O interfaces can be expensive, especially if specialized hardware is required
to connect a particular device to a computer system.
Complexity: Some I/O interfaces can be complex to configure and require specialized
knowledge to set up and maintain. This can be a disadvantage for users who are not
familiar with the technical aspects of computer hardware.
Compatibility issues: While I/O interfaces are designed to be compatible with a wide
range of devices, there can still be compatibility issues with certain devices. In some
cases, device drivers may need to be installed to ensure proper functionality.
Security risks: I/O interfaces can be a security risk if they are not properly configured
or secured. Hackers can exploit vulnerabilities in I/O interfaces to gain unauthorized
access to a computer system or steal data.

Why Memory Hierarchy is Required in the System?


Memory Hierarchy helps in optimizing the memory available in the computer. There
are multiple levels present in the memory, each one having a different size,
different cost, etc. Some types of memory like cache, and main memory are faster
as compared to other types of memory but they are having a little less size and are
also costly whereas some memory has a little higher storage value, but they are a
little slower. Accessing of data is not similar in all types of memory, some have
faster access whereas some have slower access.
Types of Memory Hierarchy
This Memory Hierarchy Design is divided into 2 main types:
 External Memory or Secondary Memory: Comprising of Magnetic Disk,
Optical Disk, and Magnetic Tape i.e. peripheral storage devices which are
accessible by the processor via an I/O Module.
 Internal Memory or Primary Memory: Comprising of Main Memory, Cache
Memory & CPU registers. This is directly accessible by the processor.
Memory Hierarchy Design
1. Registers
Registers are small, high-speed memory units located in the CPU. They are used
to store the most frequently used data and instructions. Registers have the fastest
access time and the smallest storage capacity, typically ranging from 16 to 64 bits.
2. Cache Memory
Cache memory is a small, fast memory unit located close to the CPU. It stores
frequently used data and instructions that have been recently accessed from the
main memory. Cache memory is designed to minimize the time it takes to access
data by providing the CPU with quick access to frequently used data.
3. Main Memory
Main memory, also known as RAM (Random Access Memory), is the primary
memory of a computer system. It has a larger storage capacity than cache
memory, but it is slower. Main memory is used to store data and instructions that
are currently in use by the CPU.
Types of Main Memory
 Static RAM: Static RAM stores the binary information in flip flops and
information remains valid until power is supplied. Static RAM has a faster
access time and is used in implementing cache memory.
 Dynamic RAM: It stores the binary information as a charge on the capacitor. It
requires refreshing circuitry to maintain the charge on the capacitors after a few
milliseconds. It contains more memory cells per unit area as compared to
SRAM.
read more about – Different Types of RAM (Random Access Memory)
4. Secondary Storage
Secondary storage, such as hard disk drives (HDD) and solid-state drives (SSD) ,
is a non-volatile memory unit that has a larger storage capacity than main memory.
It is used to store data and instructions that are not currently in use by the CPU.
Secondary storage has the slowest access time and is typically the least expensive
type of memory in the memory hierarchy.
5. Magnetic Disk
Magnetic Disks are simply circular plates that are fabricated with either a metal or
a plastic or a magnetized material. The Magnetic disks work at a high speed inside
the computer and these are frequently used.
6. Magnetic Tape
Magnetic Tape is simply a magnetic recording device that is covered with a plastic
film. Magnetic Tape is generally used for the backup of data. In the case of a
magnetic tape, the access time for a computer is a little slower and therefore, it
requires some amount of time for accessing the strip.

You might also like