Sei sulla pagina 1di 20

Arsitektur dan Organisasi Komputer

Basic Structure of Computers


Lecture 02 (24 Feb 2014)

Henry Novianus Palit


hnpalit@petra.ac.id

Computer Types (1)


Modern computers can be divided into 4 categories: Embedded computers
Integrated into a larger device or system to automatically monitor and control a physical process or environment Used for a specific purpose E.g.: industrial & home appliances, telecom products, and vehicles

Personal computers
Used widely in homes, educational institutions, and business & engineering office settings, primarily for dedicated individual use Support general computation, doc preparation, CAD, audiovisual entertainment, interpersonal communication, and Internet browsing Classifications:

Desktop serve general needs & fit within a typical personal workspace Workstation offer higher computational capacity & more powerful graphical display capabilities for engineering & scientific work Portable & notebook provide the basic features in a smaller lightweight package
Arsitektur & Organisasi Komputer

Computer Types (2)


Modern computers (contd): Servers and enterprise systems
Large computers meant to be shared by a potentially large number of users who access them from some form of personal computer over a public or private network May host large databases and provide information processing for a government agency or a commercial organization

Supercomputers and grid computers


The most expensive, the highest performance, and physically the largest category of computers Supercomputers are used for highly demanding computations such as weather forecasting, engineering design & simulation, and scientific work Grid computers (a more cost-effective alternative) combine a large number of PCs & disk storage units in a physically distributed highspeed network (called a grid) and is managed as a coordinated computing resource
Arsitektur & Organisasi Komputer 3

Basic Structure of Computers (1)


Input accept coded info from human operators using devices, e.g., keyboards, or from other computers over digital communication lines Memory store the received info, either for later use or to be processed immediately by ALU; also, store the program (i.e., processing steps) ALU process the info according to the steps specified by a program Output send the results back to outside world Control unit coordinate all of these actions

A computer has 5 functionally independent main parts:

An interconnection network provides the means for the

functional units to exchange info and coordinate their actions Arithmetic & logic circuits + main control circuits = processor Input equipments + output equipments = I/O units
Arsitektur & Organisasi Komputer 4

Basic Structure of Computers (2)


Some simple definitions:
Info handled by a computer is either instructions or data (Machine) instructions are explicit commands that
Govern the transfer of info within a computer as well as between the computer and its I/O devices Specify the arithmetic and logic operations to be performed

Program is a list of instructions which perform a task


The computer is controlled by the stored program, except for possible

external interruption by an operator or by I/O devices connected to it

Data are numbers and characters that are used as operands by the instructions; data are also stored in the memory Instructions and data handled by a computer must be encoded in a suitable format (i.e., bits / binary digits)
Arsitektur & Organisasi Komputer 5

Input Units

Arsitektur & Organisasi Komputer

Output Units

Arsitektur & Organisasi Komputer

I/O Units

Arsitektur & Organisasi Komputer

Memory Unit (1)


Two classes of storage:
Primary memory
Operates at electronic speed but does not retain info when power is turned off Programs must be stored in the memory while being executed The storage cells are handled in groups of fixed size called words A distinct address is associated with each word location Random-access memory (RAM) = a memory in which any location can be accessed in a short and fixed amount of time Memory access time = the time required to access one word (typically from a few to 100 ns for current RAM)

Secondary magnetic disks, optical disks, and flash memory devices

Less expensive, larger & permanent storage, but longer access time
Arsitektur & Organisasi Komputer 9

Memory Unit (2)


Cache memory:
An adjunct to the main memory Smaller & faster RAM unit Tightly coupled with the processor and usually contained on the same IC chip Used to hold sections of a program that are currently being executed, along with any associated data Facilitate high instruction execution rates As execution proceeds, instructions are fetched into the processor chip, and a copy of each is placed in the cache When the execution of an instruction requires data located in the main memory, the data are fetched and copies are also placed in the cache Repeated execution of the same instructions and repeated access to the same data can be fetched quickly (i.e., a hit)
Arsitektur & Organisasi Komputer 10

Arithmetic and Logic Unit


It is where most computer operations are executed Any arithmetic or logic operation (e.g., addition, subtraction, multiplication, division, or comparison of numbers) is initiated by bringing the required operands into the processor, where the operation is performed by the ALU Operands brought into the processor are stored in high-speed storage elements called registers, each can store one word of data Access times to registers are even shorter than access times to the cache unit on the processor chip
Arsitektur & Organisasi Komputer 11

Control Unit
Coordinate the operations of other units (i.e., memory, ALU, and I/O units) in fetching, storing, and processing information It is effectively the nerve center that sends control signals to other units and senses their states Control circuits generate the timing signals that govern the transfers and determine when a given action is to take place

Arsitektur & Organisasi Komputer

12

Summary of a Computer Operation


The computer accepts information in the form of programs and data through an input unit and stores them in the memory Information stored in the memory is fetched under program control into an ALU, where it is processed Processed information leaves the computer through an output unit All activities in the computer are directed by the control unit

Arsitektur & Organisasi Komputer

13

Basic Operational Concepts (1)


The activity in a computer is governed by instructions Sample instruction 1: Load R2, LOC
Reads the contents of a memory location whose address is represented symbolically by label LOC and loads them into processor register R2 The original contents of location LOC are preserved, whereas those of register R2 are overwritten Execution steps:
The instruction is fetched from the memory into the processor The operation to be performed is determined by the control unit The operand at LOC is then fetched from the memory into the processor The operand is stored in register R2
Arsitektur & Organisasi Komputer 14

Basic Operational Concepts (2)


Sample instruction 2: Add R4, R2, R3
Adds the contents of registers R2 and R3, then places their sum into register R4 Operands in R2 and R3 are not altered, but the previous value in R4 is overwritten by the sum

Sample instruction 3: Store R4, LOC


Copies the operand in register R4 to memory location LOC The original contents of location LOC are overwritten, but those of R4 are preserved

Transfers between the memory and the processor are initiated by sending the address of the desired memory location to the memory unit and asserting the appropriate control signals
Arsitektur & Organisasi Komputer 15

Basic Operational Concepts (3a)


Instruction register (IR) holds the instruction currently being executed Program counter (PC) contains the memory address of the next instruction to be fetched & executed General purpose registers (R0 through Rn-1) hold operands that have been loaded from the memory for processing Processor-memory interface Read sends the address to the memory along with a Read control signal, waits for the retrieved word, transfers it to the appropriate processor register Write transfers both the address and the word to the memory along with a Write control signal
Arsitektur & Organisasi Komputer 16

Basic Operational Concepts (4a)


Typical operating steps:
It begins when the PC is set to point the first instruction of the program The contents of the PC are transferred to the memory along with a Read control signal The addressed word that has been fetched from the memory is loaded into the IR (ready to be interpreted and executed) If an operand in the memory is required for an instruction, it is fetched by sending its address to the memory and initiating a Read operation The operand fetched from the memory is stored in a processor register The ALU performs a desired arithmetic operation on the values in processor registers Result is sent to a processor register If a Store instruction is given, the result is transferred from the processor register to the memory, along with the address, and a Write operation is initiated At some point during the execution of each instruction, the contents of the PC are incremented
Arsitektur & Organisasi Komputer 17

Basic Operational Concepts (3b)


Instruction register (IR) holds the instruction currently being executed Program counter (PC) contains the memory address of the next instruction to be fetched & executed General purpose registers (R0 through Rn-1) hold operands that have been loaded from the memory for processing MAR & MDR facilitate communication with the memory MAR holds the memory address of the location to be accessed MDR contains the data to be written into or read out of the addressed location

Arsitektur & Organisasi Komputer

18

Basic Operational Concepts (4b)


Typical operating steps:
It begins when the PC is set to point the first instruction of the program The contents of the PC are transferred to the MAR and a Read control signal is sent to the memory The addressed word that has been fetched from the memory is loaded into the MDR, then transferred to the IR (ready to be decoded & executed) If an operand in the memory is required for an instruction, it is fetched by sending its address to the MAR and initiating a Read operation The operand fetched from the memory is stored in the MDR and then transferred to a processor register The ALU performs a desired arithmetic operation on the values in processor registers Result is sent to a processor register If the result is to be stored in the memory, the result is sent to the MDR and the destination address to the MAR, and a Write operation is initiated At some point during the execution of each instruction, the contents of the PC are incremented
Arsitektur & Organisasi Komputer 19

Basic Operational Concepts (5)


Interrupts:
Normal execution of a program may be preempted if some device requires urgent service, e.g., a monitoring device in a computer-controlled industry process may detect a dangerous condition The device raises an interrupt signal, which is a request for service by the processor The processor provides the requested service by executing a program called interrupt-service routine Execution of the current program must be suspended and the internal state of the processor (i.e., the contents of the PC, the general-purpose registers, and some control info) must be saved in the memory before servicing the interrupt request When the interrupt-service routine is completed, the state of the processor is restored from the memory so that the interrupted program may continue
Arsitektur & Organisasi Komputer 20

Potrebbero piacerti anche