ITEC255 Chapter3 (Part2) With Explanations
ITEC255 Chapter3 (Part2) With Explanations
ITEC255 Chapter3 (Part2) With Explanations
ITEC255
Computer Organization
ITEC255 - Computer Organization & Architecture
& Architecture
2
Computer Function
• Two approaches can be taken to dealing with multiple interrupts.
1. The first is to disable interrupts while an interrupt is being
processed. A disabled interrupt simply means that the processor can
and will ignore that interrupt request signal. If an interrupt occurs
during this time, it generally remains pending and will be checked by
the processor after the processor has enabled interrupts. This
ITEC255 - Computer Organization & Architecture
Interrupt Y
Sequential Interrupt
Processing
3
Computer Function
Interrupt Y
Nested Interrupt
Processing
4
Computer Function
Example:
• Consider a system with three I/O devices: a printer, a disk and
a communications line, with increasing priorities of 2, 4 and 5,
respectively.
• A user program (priority=0) begins at t=0.
ITEC255 - Computer Organization & Architecture
5
t=0 UP (0)
t=10 P (2)
Computer Function t=20 D (4)
t=15 CL (5)
User program (0)
• Solution for t=0
sequential P (2)
interrupt t=10
t=10
processing P (2)
t=10 CL (5)
t=15
Queue
ITEC255 - Computer Organization & Architecture
UP CL D t=20 D (4)
(0) (5) (4) t=20
CL (5)
t=20
t=30
D (4)
t=30
UP (0)
t=40
t=40
6
t=0 UP (0)
t=10 P (2)
Computer Function t=20 D (4)
t=15 CL (5)
UP (0)
• Solution for t=0
nested P (2)
interrupt t=10
t=10
processing P (2) CL (5)
t=10
t=15
CL (5)
ITEC255 - Computer Organization & Architecture
t=15 D (4)
t=20
Queue
UP P D t=25
(0) (2) (4)
D (4)
t=25
P (2) t=35
t=35
UP (0)
t=40
t=40
7
Interconnection Structures
8
Interconnection Structures
• Interconnection structure must support following types of
transfers:
Memory to CPU: Processor reads an instruction or a unit
of data from memory.
CPU to memory: Processor writes a unit of data to
ITEC255 - Computer Organization & Architecture
memory.
I/O to CPU: Processor reads data from an I/O device.
CPU to I/O: Processor sends data to an I/O device.
I/O to or from memory: An I/O module is allowed to
exchange directly with memory, without going through
processor, using Direct Memory Access (DMA).
10
Bus Interconnection
bus lines.
• Computer systems contain a number of different buses that
provide pathways between components at various levels of the
computer system hierarchy.
• A bus that connects major computer components (processor,
memory, I/O) is called a system bus.
• The most common computer interconnection structures are
based on the use of one or more system buses.
11
Bus Interconnection
• Bus Structure
A system bus consists, typically, of from about 50 to
hundreds of separate lines. Each line is assigned a
particular meaning or function.
Although there are many different bus designs, on any bus
ITEC255 - Computer Organization & Architecture
12
Bus Interconnection
Because each line can carry only 1 bit at a time, the number
of lines determines how many bits can be transferred at a
time.
The width of the data bus is a key factor in determining
overall system performance.
For example, if the data bus is 32 bits wide and each
instruction is 64 bits long, then the processor must access
the memory module twice during each instruction cycle.
13
Bus Interconnection
14
Bus Interconnection
15
Bus Interconnection
Typical control lines include:
Memory write: Causes data on the bus to be written into the addressed
location.
Memory read: Causes data from the addressed location to be placed on
the bus.
I/O write: Causes data on the bus to be output to the addressed I/O port.
ITEC255 - Computer Organization & Architecture
I/O read: Causes data from the addressed I/O port to be placed on the
bus.
Transfer ACK: Indicates that data have been accepted from or placed
on the bus.
Bus request: Indicates that a module needs to gain control of the bus.
Bus grant: Indicates that a requesting module has been granted control
of the bus.
Interrupt request: Indicates that an interrupt is pending.
Interrupt ACK: Acknowledges that the pending interrupt has been
recognized.
Clock: Is used to synchronize operations.
Reset: Initializes all modules.
16
Bus Interconnection
18
Bus Interconnection
to main memory.
• Main memory can be moved off local bus onto a system bus.
• It is possible to connect I/O controllers directly onto system
bus. A more efficient solution is to make use one or more
expansion buses for this purpose:
An expansion bus interface buffers data transfers between
system bus and I/O controllers on expansion bus.
An expansion bus interface insulates memory-to-processor
traffic from I/O traffic.
19
ITEC255 - Computer Organization & Architecture Bus Interconnection
• But it is not just a high speed that makes PCI attractive. PCI is
specifically designed to meet economically the I/O requirements
of modern systems; it requires very few chips to implement and
supports other buses attached to the PCI bus.
23
Peripheral component interconnect (PCI)
• Figure shows a typical use of PCI in a single-processor system.
A combined DRAM controller and bridge to the PCI bus provides tight
coupling with the processor and the ability to deliver data at high speeds.
The bridge acts as a data buffer so that the speed of the PCI bus may
differ from that of the processor’s I/O capability.
ITEC255 - Computer Organization & Architecture
24
Peripheral component interconnect (PCI)
• In a multiprocessor system, one or more PCI configurations may be connected
by bridges to the processor’s system bus.
The system bus supports only the processor/cache units, main memory,
and the PCI bridges.
Again, the use of bridges keeps the PCI independent of the processor
speed yet provides the ability to receive and deliver data rapidly.
ITEC255 - Computer Organization & Architecture
25