Sei sulla pagina 1di 12

Computer Organization

Chapter 1: Basic Structure of Computers


Computer Organization includes the high level aspects of a design, such as memory
system, the bus structure and the design of the internal CPU.
1.1 Computer Types
Computer is a fast electronic calculating machine which accepts digital input, processes it
according to the internally stored instructions (Programs) and produces the result on the output
device. The internal operation of the computer can be as depicted in the figure below:

Figure 1: Fetch, Decode and Execute steps in a Computer System


The computers can be classified into various categories as given below:

Micro Computer
Laptop Computer
Work Station
Super Computer
Server
Main Frame
Hand Held
Multi core

Micro Computer: A personal computer; designed to meet the computer needs of an individual.
Provides access to a wide variety of computing applications, such as word processing, photo
editing, e-mail, and internet.
Priyanka H V

Page 1

Computer Organization
Laptop Computer: A portable, compact computer that can run on power supply or a battery
unit. All components are integrated as one compact unit. It is generally more expensive than a
comparable desktop. It is also called a Notebook.
Work Station: Powerful desktop computer designed for specialized tasks. Generally used for
tasks that requires a lot of processing speed. Can also be an ordinary personal computer attached
to a LAN (local area network).
Super Computer: A computer that is considered to be fastest in the world. These are used for
very complex numerical-calculations and to execute tasks that would take lot of time for other
computers. For Ex: Modeling weather systems, genome sequence, aircraft design and military
applications etc.
Servers: These have large database storage-units and can also execute requests from other
computers. These are used in banks & educational institutions.
Main Frame(Enterprise Systems): These are used for business data-processing.These have
large computational-power and larger storage-capacity than workstations.Large expensive
computer capable of simultaneously processing data for hundreds or thousands of users. Used to
store, manage, and process large amounts of data that need to be reliable, secure, and centralized.
Hand Held: It is also called a PDA (Personal Digital Assistant). A computer that fits into a
pocket, runs on batteries, and is used while holding the unit in your hand. Typically used as an
appointment book, address book, calculator and notepad.
Multi Core: Have Multiple Cores parallel computing platforms. Many Cores or computing
elements in a single chip. Typical Examples: Sony Play station, Core 2 Duo, i3, i7 etc.
1.2 Functional Unit
A computer in its simplest form comprises five functional units namely input unit, output unit
memory unit, arithmetic & logic unit and control unit. Figure 2 depicts the functional units of
a computer system.

Priyanka H V

Page 2

Computer Organization

Figure 2: Basic functional units of a computer


1. Input Unit: Computer accepts encoded information through input unit. The
standard input device is a keyboard. Whenever a key is pressed, keyboard controller
sends the code to CPU/Memory.
Examples include Mouse, Joystick, Tracker ball, Light pen, Digitizer, Scanner etc.
2. Memory Unit: Memory unit stores the program instructions (Code), data and results of
computations etc. Memory unit is classified as:

Primary /Main Memory

Secondary /Auxiliary Memory

Primary memory is a semiconductor memory that provides access at high speed. Run time
program instructions and operands are stored in the main memory.
Main memory is classified again as ROM and RAM. ROM holds system programs and firmware
routines such as BIOS, POST, I/O Drivers that are essential to manage the hardware of a
computer.
RAM is termed as Read/Write memory or user memory that holds run time program instruction
and data.
While primary storage is essential, it is volatile in nature and expensive.
The memory contains a large number of semiconductor storage cells(i.e. flip-flops), each capable
of storing one bit of information. These are processed in a group of fixed site called word.The
memory is organized so that the contents of one word can be stored or retrieved in one basic
operation.
To provide easy access to a word in memory, a distinct address is associated with each word
location. Addresses are numbers that identify memory location.
Number of bits in each word is called word length of the computer. Programs must reside in the
memory during execution. Instructions and data can be written into the memory or read out
under the control of processor.
Memory in which any location can be reached in a short and fixed amount of time after
specifying its address is called RAM (Random Access Memory).
The time required to access one word in called memory access time. Memory which is only
readable by the user and contents of which cant be altered is called read only memory (ROM) it
contains operating system.
Secondary memories are non volatile in nature. Secondary-storage is used when large amounts
of data & many programs have to be stored.
Priyanka H V

Page 3

Computer Organization
Eg: magnetic disks and optical disks(CD-ROMs).
3. Arithmetic and logic unit: This unit is used for performing arithmetic & logical
operations. Any arithmetic operation is initiated by bringing the required operand into the
processor (i.e. registers), where the operation is performed by the ALU.
ALU consist of necessary logic circuits like adder, comparator etc., to perform operations
of addition, multiplication, comparison of two numbers etc.
4. Output Unit: Computer after computation returns the computed results, error messages,
etc. via output unit. The standard output device is a video monitor, LCD/TFT monitor.
Other output devices are printers, plotters etc.
5. Control Unit: Control unit co-ordinates activities of all units by issuing control signals.
Control signals issued by control unit govern the data transfers and then appropriate
operations take place. Control unit interprets or decides the operation/action to be
performed.
The operations of a computer can be summarized as follows:
1. A set of instructions called a program reside in the main memory of computer.
2. The CPU fetches those instructions sequentially one-by-one from the main memory,
decodes them and performs the specified operation on associated data operands in ALU.
3. Processed data and results will be displayed on an output unit.
4. All activities pertaining to processing and data movement inside the computer machine
are governed by control unit.
1.3 Basic Operational Concepts
An Instruction consists of two parts, an Operation code and operand/s as shown below:
OPCODE

OPERAND/s

Let us see a typical instruction


ADD LOCA, R0
This instruction is an addition operation. The following are the steps to execute the instruction:
Step 1: Fetch the instruction from main memory into the processor
Step 2: Fetch the operand at location LOCA from main memory into the processor
Step 3: Add the memory operand (i.e. fetched contents of LOCA) to the contents of register R0
Step 4: Store the result (sum) in R0.
The same instruction can be realized using two instructions as
Load LOCA, R1
Priyanka H V

Page 4

Computer Organization
Add

R1, R0

The steps to execute the instructions can be enumerated as below:


Step 1: Fetch the instruction from main memory into the processor
Step 2: Fetch the operand at location LOCA from main memory into the processor Register R1
Step 3: Add the content of Register R1 and the contents of register R0
Step 4: Store the result (sum) in R0.
Connection between processor and main memory:
Figure 3 below shows how the memory and the processor are connected. As shown in the
diagram, in addition to the ALU and the control circuitry, the processor contains a number of
registers used for several different purposes.
The instruction register (IR):- Holds the instructions that is currently being executed. Its output
is available for the control circuits which generates the timing signals that control the various
processing elements in one execution of instruction.
The program counter (PC):This is another specialized register that keeps track of execution of a program. It contains the
memory address of the next instruction to be fetched and executed.
Besides IR and PC, there are n-general purpose registers R0 through Rn-1.R0,R1 & Rn-1 which
can be used by the programmers during writing programs.
The other two registers which facilitate communication with memory are: 1. MAR (Memory Address Register):- It holds the address of the location to be accessed.
2. MDR (Memory Data Register):- It contains the data to be written into or read out of the
address location.

Figure 3: Connections between the processor and the memory


Priyanka H V

Page 5

Computer Organization

The interaction between the processor and the memory and the direction of flow of information
is as shown in the diagram below:
Following are the steps that take place to execute an instruction
Operating steps are
1. Programs reside in the memory & usually get these through the I/P unit.
2. Execution of the program starts when the PC is set to point at the first instruction of the
program.
3. Contents of PC are transferred to MAR and a Read Control Signal is sent to the memory.
4. After the time required to access the memory elapses, the address word is read out of the
memory and loaded into the MDR.
5. Now contents of MDR are transferred to the IR & now the instruction is ready to be decoded
and executed.
6. If the instruction involves an operation by the ALU, it is necessary to obtain the required
operands.
7. An operand in the memory is fetched by sending its address to MAR & Initiating a read cycle.
8. When the operand has been read from the memory to the MDR, it is transferred from MDR to
the ALU.
9. After one or two such repeated cycles, the ALU can perform the desired operation.
10. If the result of this operation is to be stored in the memory, the result is sent to MDR.
11. Address of location where the result is stored is sent to MAR & a write cycle is initiated.
12. The contents of PC are incremented so that PC points to the next instruction that is to be
executed.

Figure 4: Interaction between the memory and the ALU


1.4 BUS STRUCTURES
Group of lines that serve as connecting path for several devices is called a bus (one bit per line).
Individual parts must communicate over a communication line or path for exchanging data,
Priyanka H V

Page 6

Computer Organization
address and control information as shown in the diagram below.
Printer example processor to printer. A common approach is to use the concept of buffer
registers to hold the content during the transfer.
Since the bus can be used for only one transfer at a time, only two units can actively use the bus
at any given time. Bus control lines are used to arbitrate multiple requests for use of one bus.
Single bus structure is

Low cost
Very flexible for attaching peripheral devices

Multiple bus structure certainly increases, the performance but also increases the cost
significantly.

Figure 5: Single bus structure


All the interconnected devices are not of same speed & time, leads to a bit of a problem. This is
solved by using cache registers (ie buffer registers). These buffers are electronic registers of
small capacity when compared to the main memory but of comparable speed.
The instructions from the processor at once are loaded into these buffers and then the complete
transfer of data at a fast rate will take place.
1.5 PERFORMANCE
The most important measure of the performance of a computer is how quickly it can execute
programs. The speed with which a computer executes program is affected by the design of its
hardware. For best performance, it is necessary to design the compiles, the machine instruction
set, and the hardware in a coordinated way.

Priyanka H V

Page 7

Computer Organization

The pertinent parts in fig.d which includes the cache memory as part of the processor unit.
Lets examine the flow of program instructions and data between the memory and the processor.
At the start of execution, all program instructions and the required data are stored in the main
memory. As the execution proceeds, instructions are fetched one by one over the bus into the
processor, and a copy is placed in the cache later if the same instruction or data item is needed a
second time, it is read directly from the cache.
The processor and relatively small cache memory can be fabricated on a single IC chip. The
internal speed of performing the basic steps of instruction processing on chip is very high and is
considerably faster than the speed at which the instruction and data can be fetched from the main
memory. A program will be executed faster if the movement of instructions and data between the
main memory and the processor is minimized, which is achieved by using the cache.
1.5.1 Processor clock: Processor circuits are controlled by a timing signal called clock. The clock designer the regular
time intervals called clock cycles.
To execute a machine instruction the processor divides the action to be performed into a
sequence of basic steps that each step can be completed in one clock cycle.
The length P of one clock cycle is an important parameter that affects the processor performance.
1.5.2 Basic Performance Equation:
The basic performance equation is given by
T = (N * S) / R
where T=execution time, N=number of instructions, S=average cycles per instruction,
R=clock rate in cycles per second
1.5.3 Pipelining and Super Scalar Operation:

Priyanka H V

Page 8

Computer Organization
A substantial improvement in performance can be achieved by overlapping the execution of
successive instructions using a technique called pipelining.
Consider:

Add R1 R2 R3

This adds the contents of R1 & R2 and places the sum into R3.
The contents of R1 & R2 are first transferred to the inputs of ALU. After the addition operation
is performed, the sum is transferred to R3. The processor can read the next instruction from the
memory, while the addition operation is being performed. Then of that instruction also uses, the
ALU, its operand can be transferred to the ALU inputs at the same time that the add instructions
is being transferred to R3.
A higher degree of concurrency can be achieved if multiple instructions pipelines are
implemented in the processor. This means that multiple functional units are used creating parallel
paths through which different instructions can be executed in parallel with such an arrangement,
it becomes possible to start the execution of several instructions in every clock cycle. This mode
of operation is called superscalar execution.
1.5.4 Clock rate
These are two possibilities for increasing the clock rate R.
1. Improving the IC technology makes logical circuit faster, which reduces the time of execution
of basic steps. This allows the clock period P, to be reduced and the clock rate R to be increased.
2. Reducing the amount of processing done in one basic step also makes it possible to reduce the
clock period P. however if the actions that have to be performed by an instructions remain the
same, the number of basic steps needed may increase.
1.5.5 Instruction set CISC & RISC:Simple instructions require a small number of basic steps to execute.
Complex instructions involve a large number of steps.
For a processor that has only simple instruction a large number of instructions may be needed to
perform a given programming task. This could lead to a large value of N and a small value of
S on the other hand if individual instructions perform more complex operations, a fewer
instructions will be needed, leading to a lower value of N and a larger value of S.
Reduced instruction set computer
Large N, small S
Complex instruction set computer
Small N, large S

Priyanka H V

Page 9

Computer Organization

1.5.6 COMPILER
Translates high level language such as C, C++ and Java to machine instructions. Aims to reduce
NS
1.5.7 PERFORMANCE MEASUREMENT
Benchmark refers to standard task used to measure how well a processor operates.
Accordingly, it gives performance measure for a computer as the time required to execute a
given benchmark program. Initially some attempts were made to create artificial programs that
could be used as bench mark programs. But synthetic programs do not properly predict the
performance obtained when real application programs are run.
To evaluate the performance of Computers, a non-profit organization known as SPEC-System
Performance Evaluation Corporation employs agreed-upon application programs of real world
for benchmarks.
The SPEC rating is computed as follows
Running time on the reference computer
SPEC rating =
Running time on the computer under test
If the SPEC rating = 50
Means that the computer under test is 50 times as fast as the ultra sparc10.
The overall SPEC rating for the computer is given by

Where n = number of programs in suite.


1.6 GENERATION OF COMPUTERS
Priyanka H V

Page 10

Computer Organization
Development of technologies used to fabricate the processors, memories and I/O units of
the computers has been divided into various generations as given below:

First generation

Second generation

Third generation

Fourth generation

Beyond the fourth generation

First generation: 1946 to 1955

Stored program was introduced by John Von Neumann.


Program and their data are located in same memory.
Computers of this generation used Vacuum Tubes to implement logic function.
The computes were built using stored program concept. Ex: ENIAC, EDSAC, IBM 701.
Computers of this age typically used about ten thousand vacuum tubes. They were bulky in

size had slow operating speed, short life time and limited programming facilities.
Storage device: Magnetic core memory and magnetic tapes.
Assemblers: To translate low level language programs to machine level programs.

Second generation: 1955 to 1965

Computers of this generation used the germanium transistors as the active switching

electronic device. Ex: IBM 7000, B5000, IBM 1401.


Comparatively smaller in size About ten times faster operating speed as compared to first

generation vacuum tube based computers.


Consumed less power, had fairly good reliability.
Availability of large memory was an added advantage: Magnetic drum storage
High level language: FORTRAN.
Compiler: To translate High level language programs to machine level programs.
Separate I/O processor: helps in parallel execution of program with central processor.

Third generation: 1965 to 1975

The computers of this generation used the Integrated Circuits as the active electronic

components. Ex: IBM system 360, PDP minicomputer etc.


They were still smaller in size.
They had powerful CPUs with the capacity of executing 1 million instructions per second

(MIPS). Used to consume very less power consumption.


Operating System allowed efficient sharing of computer system by several user program.
Cache and virtual memory.

Priyanka H V

Page 11

Computer Organization
Fourth generation: 1976 to 1990

The computers of this generation used the LSI chips like microprocessor as their active

electronic element. HCL horizen III, and WIPROS Uniplus+ HCLs Busybee PC etc.
They used high speed microprocessor as CPU. They were more user friendly and highly

reliable systems.
They have large storage capacity disk memories.
Centralized computing on mainframes used for business applications.
Concurrency, pipelining, cache and virtual memories evolved to produce the highperformance computing system.

Beyond Fourth Generation: 1990 onwards

Specialized and dedicated VLSI chips are used to control specific functions of these

computers. Modern Desktop PCs, Laptops or Notebook Computers.


Widespread use of vast information resource on the internet.
Organizational or application driven features.

Priyanka H V

Page 12

Potrebbero piacerti anche