System Organization
System Organization
- How computers and their major components are interconnected and managed
at the system level.
7.1. Communication Methods
7.1.1 Basic concepts
Intrasystem communication : within a single computer, primarily buses
parallel
Intersystem communication : electrical cables and optical fibers. serial
computer network.
Buses : Physical links among the components as well as the controlling mechanism
Long-distance communication
Whereas intrasystem communication is serial by word, intersystem
communication is serial by bit due to the difficulty of synchronizing data bits
sent in parallel over long distances.
A sequence of many bits called a message is transmitted at one time.
When the pulses representing digital signal 0 and 1 are transmitted over long
distances, the pulses may become unrecognizable due to the distortion caused
by noise.
More cost-effective to embed the data in analog signals for average
quality of transmission medium.
Interconnection Structures
Bus interfacing :
Bus arbitration : a selection mechanism to decide among competing requests to the bus
by different units at the same time.
Daisy chaining, polling, and independent request.
Daisy-Chaining
This method involves three control signals, BUS REQUEST, BUS GRANT and BUS
BUSY.
--When any unit is required to use the bus, which enables the BUS REQUEST signal.
--bus master will respond to the request by placing a signal on BUS GRANT line.
--On receiving the BUS GRANT signal, a requesting unit enables its physical bus
connections and activates BUS BUSY for the duration of its bus activity.
--When the first unit receives the bus grant signal, it blocks further propagation.
-- The unit closest to the bus-control unit has the highest priority. Selection
priority is determined by the order in which the units are linked by the Bus
Grant lines.
--susceptible to failure.
Very few control lines and a simple fixed arbitration algorithm. A units priority
cannot be changed under program control.
Can be used with unlimited number of bus units.
Polling method
Independent requesting
-- Every unit has separate BUS REQUEST and BUS GRANT lines.
--When any unit is required to use the bus, which enables its own request line and bus
controller will grant the bus according to the priority.
Programmed IO :
--IO operations are completely controlled by CPU.
--CPU executes programs that initiate, direct and terminate the IO operations.
--Require little or no special hardware, but causes CPU to spend a lot of time for
relatively trivial IO-related functions.
--The IO device does not have direct access to Memory.
-- A data transfer from an IO device to M requires CPU to execute several instructions,
including an input instruction to transfer the word from IO device to CPU and a store
instruction to transfer a word from CPU to M .
IO addressing : The address lines of the system bus for memory locations can also be
used to select IO devices.Two types of addressing
Memory-mapped IO :
--assign a part of main memory addresses to IO ports.
--An instruction that causes data to be fetched from or stored at address X automatically
becomes an IO instruction if X is the address of IO port.
--usual memory load and store instructions are used to transfer data words to or from
IO ports. no special IO instructions are used.
DMA
--IO device requests the CPU for IO operation with the help of an additional
controller called DMA controller.
--by receiving the DMA request from any IO device, CPU suspends its current
activity at appropriate breakpoints and grants the system bus to the DMA
controller.
-- then the DMA controller takes the control of system bus and manages the IO
operation without CPU intervention.
DMA
DMA controller contains a data buffer register IODR, an address register IOAR, and a data
counter register DC, to transfer data to or from contiguous region of memory.
--IODR is used for the temporary storage of data to be transferred.
--IOAR is used to store the base address of the memory region to be used in the data transfer.
--DC is used to store the number of words to be transferred to or from that region.
Two different ways of data transfer in DMA:
DMA block transfer : transfer a sequence of arbitrary length in a single burst. The fastest IO
data-transfer rates, but CPU may be inactive for relatively long periods.
Cycle stealing method : allows the DMA controller to use the system bus to
transfer one data word, after which it must return control of the bus to CPU.
reduced IO transfer rate, also reduced interference by DMA controller.
Interrupts : the primary means by which IO devices obtain the services of CPU.
Interrupts significantly improve a computers IO performance by giving IO
devices direct and rapid access to CPU and by freeing CPU from the need to
check the status of its IO devices.
The basic interrupt method is to activate INTERRUPT REQUEST that
connects the interrupt source to CPU.
The process of interrupt request
1.The CPU identifies the source of the interrupt,
2.The CPU obtains the memory address of the required interrupt handler. This
address can be provided by the interrupting device along with its interrupt
request.
3.The program counter PC and other CPU status information are saved .
4.The program counter PC is loaded with the address of the interrupt handler.
Execution proceeds until a return instruction is encountered, which transfers
control back to the interrupted program
Vectored interrupts : The interrupting device supplies CPU with the starting
address or interrupt vector of the interrupt-handling program to get
the most flexible response.
IOP organization : IOP and CPU share access to a common memory M via
the system bus