Tải bản đầy đủ (.pdf) (13 trang)

Tài liệu Computer Organization pdf

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (86.96 KB, 13 trang )

1
EE 4504 Section 2 1
EE 4504
Computer Organization
Section 2
The Computer System and its
Interconnection Structures
EE 4504 Section 2 2
System Components
At the global and processor levels of
computer design, we are concerned about
four component “primitives”
– CPUs
» ALUs
» Control units
– Memories
– I/O devices
– Interconnection structures
Knowledge of these components and their
operation (interaction) offers insight into
system bottlenecks, alternate pathways,
magnitude of system failures, and
opportunities for performance
enhancement
2
EE 4504 Section 2 3
von Neumann’s Architecture
von Neumann is credited with developing
the idea of controlling the operation of
hardware through the manipulation of
control signals


– First machines (e.g., ENIAC) had to be
physically rewired to change the computation
being performed
– von Neumann used the memory of the
computer to store the sequence of the control
signal manipulations required to perform a task
-- software programming
– the von Neumann architecture has been the
basis for virtually all computer designs since
the first generation
EE 4504 Section 2 4
Characteristics
– Both data and instructions (control sequences)
are stored in a single read-write memory
» Can not tell the difference between data and
instructions by examining a memory
location
– Memory contents are addressable by location
without regard for the type of data contained
there
– Execution occurs in a sequential fashion by
reading consecutive instructions from memory
Instruction codes
Instruction Interpreter
(control unit)
Arithmetic logic unit
Data in
Results out
3
EE 4504 Section 2 5

Instruction execution follows a set cycle
– Determine the address of the next instruction
– Fetch that instruction from memory
– Decode the instruction to determine what is to
be performed
– Calculate the addresses of needed operands and
fetch the operands
– Perform the operation on the operands
– Store the results
– Check for and service pending interrupts
Figure 3.12 State diagram for the instruction cycle
EE 4504 Section 2 6
Interrupts
The mechanism by which other system
modules may interrupt the normal
processing of the CPU
These devices are 1-10 orders of
magnitude slower than the CPU
– CPU can waste vast amounts of processing
cycles waiting for these slow devices to
perform their tasks
Interrupts let the CPU execute its normal
instruction sequence and pause to service
the external devices only when they signal
(the interrupts) that they are ready for the
CPU’s attention
The processor and the O/S are responsible
for recognizing an interrupt, suspending
the user program, servicing the interrupt,
and then resuming the user program

4
EE 4504 Section 2 7
Figure 3.8 Transfer of control via interrupts
EE 4504 Section 2 8
Interrupts are processed in an interrupt
cycle within the overall instruction cycle
– At the end of an instruction cycle (operand
storage step), check to see if any interrupts are
pending
– If there aren’t any, proceed with the next
instruction
– If there are
» Suspend execution of the program and save
its “state”
» Jump to the interrupt service routine and
resume the “normal” instruction cycle
» When the ISR is completed, restore the
state of the program and resume its
operation
5
EE 4504 Section 2 9
Multiple interrupts
– A typical system can support several to several
dozen interrupts
– How should the system respond if more than 1
interrupt occurs at the same time?
» Systems prioritize the various interrupts
» At the start of the interrupt cycle, the
highest priority pending interrupt will be
serviced

» Remaining interrupt requests will be
serviced in turn
– What if an interrupt occurs while an ISR is
being executed (a result of a previous interrupt)
» Ignore the second interrupt (by disabling
interrupts) until the ISR completes -- e.g.,
MC68HC11 microcontroller
» Recognize and service the interrupt only if
it has a higher priority than the one
currently being serviced -- e.g., 8085
EE 4504 Section 2 10
Figure 3.13 Transfer of control with multiple interrupts

×