Beruflich Dokumente
Kultur Dokumente
Basic Structure of Computers: Functional unit, Basic Operational concepts, Bus structures,
System Software, Performance, The history of computer development.
Computer Types:
Computers may wisely vary in size, cost, computational power
Digital Computer or Computer:
It is fast electronic calculating machine which accepts digitized input information, processes
to a list of internally stored instructions and produces the resulting output information. List of
instructions are called Computer programs
The different types of computers are
Personal Computer:
Personal Computer found wide use in homes, schools, business, offices etc.,
It is most common form of desktop computers
Desktop Computers:
Desktop computers have processing and storage units, visual display and audio output units,
and a keyboard that can be located easily on a home or office desk
The storage media included Hard disks, CD-ROMs and Diskettes
Note book Computers:
These are compact and portable versions of PC with all of these components are packed into
a single unit the size of a thin brief case
Work stations:
These have high resolution graphics input/output (I/O) capability, but with same dimensions
as that of desktop computer. These are used in engineering applications of interactive design work.
Enterprise systems and Servers:
These are a range of large and very powerful computer systems.
These are used for business data processing in medium to large corporations that require much
more computing power and storage capacity than workstations can provide.
Servers contain sizeable database, storage units and capable of handling large volumes of
requests to access the data. Servers are widely used in education, business, and personal user
communities
Super computers:
These are used for large-scale numerical calculations required in the applications such as
weather forecasting, aircraft design and simulation.
1
Functional Units:
A Computer consists of five functional independent main parts:
1. Input
2. Memory
3. ALU
4. Output
5. Control Units
2
Input Unit:
Computers accept coded information through input units, which read the data. Most well
known input device is Keyboard. Whenever a key is pressed, the corresponding letter or digit is
automatically translated into its corresponding binary code and that code is transferred to either
Memory or Processor
Memory Unit:
Function of Memory unit is to store programs and data
Two classes of storage:
Primary Storage
Secondary Storage
Primary Storage:
It is a fast memory that operates at electronic speeds
Programs must be stored in memory while they are being executed.
Memory contains a large number of semiconductor storage cells, each capable of storing one
bit of information.
These cells are rarely read or written as individual cells but instead processed in groups of
fixed size cells called Words.
Memory is organized such that the contents of one word, containing ‘n’ bits can be stored or
retrieved in one basic operation
To provide easy access to any word in memory, a distinct Address is associated with each
word location.
A given word is accessed by specifying its address and issuing a control command that starts
the storage or retrieval process
Number of bits in each word is referred to as Word Length. Typical word length range from
16 to 64 bits. Capacity of the Memory depends on size of a computer. Programs must reside in
memory during execution. Instructions and data can be written into memory or read from the
memory
RAM: Random-Access Memory
Memory in which any location can be reached in a short and fixed amount of time after
specifying its address
Memory Access Time
Time required to access one word is called memory access time.
Memory of a computer is normally implemented as a Memory Hierarchy of three or four
levels of a semiconductor RAM units with different speeds, sizes. The Smallest and Fastest RAM
units is Cache Memory
Largest and slowest unit is Main Memory
3
Fig: Memory Hierarchy
Secondary Storage:
It is used when large amounts of data and many programs have to be stored. This storage is
used for information that is accessed infrequently
Typical devices are Magnetic disks, Magnetic tapes and Optical disks
Arithmetic and Logic Unit:
Most Computer operations are executed in it
For example, two numbers located in memory are to be added
They are brought into the processor and actual addition is carried by the ALU. Sum may be
stored in memory or retained in the processor for immediate use
When operands are brought into the processor, they are stored in high-speed storage elements
called Registers. Each Register can store one word of data. Access times to registers are somewhat
faster than access times to the fastest cache unit in Memory Hierarchy
Output Unit:
These actually are the counterparts of input unit.
Its basic function is to send the processed results to the outside world.
Examples: Printer, Speakers, Monitor etc.
Control Unit:
Memory, Arithmetic and Logic, and Input and Output Units store and process information
and perform I/O operations
Data transfer between Processor and Memory are controlled by Control Unit through Timing
Signals
A large set of control lines carries the signals used for timing and synchnorization of events
in all units.
Operation of a Computer can be summarized as:
Computer accepts information in form of programs and data through an Input Unit and stores
it 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 inside the machine are directed by Control Unit
4
Basic Operational Concepts
This instruction is an addition operation. Adds the operand at memory LOCA to operand in a
register R0, which is present in processor and here the sum is stored in R0, which is overwritten
The following are the steps to execute the instruction:
1. Fetch the instruction from main-memory into the processor.
2. Fetch the operand at location LOCA from main-memory into the processor.
3. Add the memory operand (i.e. fetched contents of LOCA) to the contents of register R0.
4. Store the result (sum) in Register R0.
The effect of the ADD LOCA,R0 instruction can be reliazed by the 2-instuction sequence.
LOAD LOCA, R1
ADD R1, R0
1. These instruction transfers the contents of memory location LOCA into processor register R1.
2. The 2nd instruction adds the contents of registers R1 and R0 and places the sum into R0.
Main Parts of Processor
The processor contains ALU, control-circuitry and many registers. Processor contains ‘n’ General-Purpose
Registers R0 through Rn-1
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.
Bus Structure:
When a word of data is transferred between units, its bits are transferred in parallel i.e., its
bits are transferred simultaneously over many wires or lines, one bit per line.
Group of lines that serves as a connecting path for several devices is called a “Bus”
In addition to the lines that carry the data, the bus must have lines for address and control purpose.
Two types of Bus Structures:
Single Bus Structure
Multiple Bus Structure
Single Bus Structure:
Simplest way to interconnect is to use the Single bus. All unots are connected to bus. Bus can
be used for only one transfer at a time.
6
Advantages:
Low Cost
Flexibility for attaching peripheral devices
Multiple Bus Structure:
Systems that contain multiple buses achieve more concurrency in operations.
Allows two or more transfers to be carried out at the same time.
Simplest way to interconnect is to use the Multiple bus as shown
7
Linking and running user-written application programs with existing standard library
routines, such as numerical computation packages
“System Software is thus responsible for the coordination of all activities in a computing system”
Application programs are written in High-level programming language, such as C, C++, Java or
Fortran. Here the programmer specifies mathematical or text-processing operations. These
operations are described in a format that is independent of particular computer used to execute the
program
Compiler: It is a System software program that translates high-level language program into a suitable
machine language program containing instructions
Text Editor: It is also a System program that all programmers use. It is used for entering and editing
application programs
File: A sequence of alphanumeric characters or binary data that is stored in memory or in secondary
storage. Name of file can be chosen by user
Operating System(OS): It is a system software component
This is a large program, or a collection of routines, that is used to control the sharing of and
interaction among various computer units as they execute application programs
Ex: In order to understand the basics of operating systems, let us consider a system with one
processor, one disk, and one printer
Steps involved in running one application program:
Assume that the application program has been compiled from a high-level language form into a
machine language form and stored on the disk
Transfer this file into memory. When the transfer is complete, execution of the program is started
Also assume that part of the program’s task involves reading a data file from the disk into memory,
performing some computation on the data, and printing the results
When execution of the program reaches the point where the data file is needed, the program requests
Operating System to transfer the data file from the disk to the memory
OS performs this task and passes execution control back to the application program, which then
proceeds to perform the required computation. When the computation is completed and the results
are ready to be printed, the application program again sends a request to the OS An OS routine is
then executed to cause the printer to print results
A convenient way to illustrate this sharing of the processor execution time is by a time-line program
as shown in Fig
8
Fig: User program and OS routine sharing of the processor
During the time period t0 to t1 , an OS routine initiates loading application program from disk to
memory, waits until the transfer is completed, and then passes execution control to application
program
A similar pattern of activity occurs during the time period t2 to t3 and period t4 to t5 , when the OS
transfers the data file from the disk and print the results. At t5 , the OS may load and execute another
application program
Disk and the processor are idle during most of the time period t4 to t5 . OS can load next program to
be executed into the memory from the disk while the printer is operating. Similarly, During the time
period t0 to t1, the OS can arrange to print the previous program’s results while the current program is
being loaded from the disk. Here the OS manages the concurrent execution of several application
programs to make the best possible use of computer resources
Elapsed time: Measure of performance of the entire computer system. Depends on all units in a
computer system (t5 – t0)
Processor time: Sum of periods needed to execute program. Depends on the Hardware involved in the
execution of individual machine instructions
Performance
Most important measure of Performance of a Computer is how quickly it can execute programs.
Speed of a computer is affected by the design of
Instruction-set.
Hardware & the technology in which the hardware is implemented.
Software including the operating system.
9
Because programs are usually written in a HLL, performance is also affected by the compiler
that translates programs into machine language. (HLL refers to High Level Language).
Let us examine the flow of program instructions and data between the memory & the processor.
At the start of execution, all program instructions are stored in the main-memory.
As execution proceeds, instructions are fetched into the processor, and a copy is placed in the cache.
Later, if the same instruction is needed a second time, it is read directly from the cache.
A program will be executed faster if movement of instruction/data between the main-memory and the
processor is minimized which is achieved by using the cache.
Processor Clock
To execute a machine instruction, the processor divides the action to be performed into a sequence of
basic steps such that each step can be completed in one clock cycle.
S be the Average number of basic steps needed to execute one machine instruction.
R be the Clock rate in cycles per second.
Program execution time is given by
10
N×S
T=
R
Above equation is referred to as the basic performance equation.
To achieve high performance, the computer designer must reduce the value of T, which means
reducing N and S, and increasing R.
Consider
ADD R1 R2 R3
This instruction 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, if 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.
When multiple number of instructions are to be executed, by creating parallel paths i.e., the several
instructions can be executed in every clock cycle. This mode of operation is called as Superscalar
Operations
Clock Rate
N×S
T=
R
There are 2 possibilities for increasing the clock rate R:
Improving the IC technology that makes logic-circuits faster. (IC refers to Integrated Circuits).
This reduces the time needed to compute a basic step.
This allows the clock period P to be reduced and the clock rate R to be increased.
Reducing the amount of processing done in one basic step also reduces the clock period P.
RISC CISC
Simple instructions taking one cycle.(Small no. Complex instructions taking multiple cycle.
of basic steps to execute) .(Large no. of basic steps to execute)
Instructions are executed by hardwired control Instructions are executed by microprogrammed
unit. control unit.
Few instructions. Many instructions.
Fixed format instructions. Variable format instructions.
11
Few addressing modes, and most instructions Many addressing modes.
have register to register addressing mode.
Multiple register set. Single register set.
Highly pipelined. No pipelined or less pipelined.
Compiler:
A Compiler translates a High-level language program into a sequence of machine instructions.
Program execution time is given by
N×S
T=
R
To reduce N, we need to have a suitable machine instruction set and a compiler that makes good use
of it
An Optimizing Compiler takes advantage of various features of the target processor to reduce the
product N X S , which is total number of clock cycles needed to execute a program
Number of cycles is dependent not only on choice of instructions, but also on the order in which they
appear in the program
For better performance, the Compiler may rearrange program instructions. Such changes must not
affect the result of computation
Performance Measurement
Benchmark refers to standard task used to measure how well a processor operates.
The Performance Measure is the time taken by a computer to execute a given benchmark.
SPEC selects & publishes the standard programs along with their test results for different
application domains. (SPEC refers to System Performance Evaluation Corporation).
Running time on the Reference Computer
SPEC Rating =
Running time on the Computer under test
SPEC rating = 50 states that the computer under test is 50 times as fast as reference-computer.
Problem:
A program contains 1000 instructions. Out of that 25% instructions requires 4 clock
cycles,40% instructions requires 5 clock cycles and remaining require 3 clock cycles for
execution. Find the total time required to execute the program running in a 1 GHz machine.
Solution:
N = 1000
25% of N= 250 instructions require 4 clock cycles.
40% of N =400 instructions require 5 clock cycles.
35% of N=350 instructions require 3 clock cycles.
T = (N*S)/R= (250*4+400*5+350*3)/1X109 =(1000+2000+1050)/1*109= 4.05 μs.
Historical Perspective
12
Computers have been developed over past 60 years
Development of the technologies used to fabricate the Processors, Memories and I/O Units of
Computers
Divided into 4 generations:
First Generation: 1945s to 1955s
Key Concept of a stored program was introduced by John Von Neumann
Programs and data were located in same memory
Assembly language was used to prepare programs and was translated into machine language for
execution
Using Vacuum tube technology, Basic arithmetic operations were performed in a few milliseconds to
implement logic functions
Mercury delay-line memory was used
I/O functions were performed by devices similar to Typewriters
Magnetic core memories and Magnetic storage devices were developed
13
Tens of thousands of transistors could be placed on a single chip called as Very Large Scale
Integration(VLSI) technology was developed
This technology allowed a complete processor to be fabricated on a single chip known as
Microprocessor
Companies such as Intel, National Semiconductor, Motorola, Texas instruments and Advanced Micro
Devices were the driving forces of this technology
Other developments are Concurrency, Pipelining, Cache and Virtual Memories were evolved to
produce high-performance systems
Portable notebook computers, Desktop personal computers and workstations, interconnected by Local
Area Networks, Wide Area Networks and the Internet have become the dominant mode of computing
1.Discuss various computer types with their applications in real world environment.
2.What are the functional units of a computer system? Explain the way of handling information by
each of them.
3.Suppose two numbers located in memory are to be added. What are the functional units of digital
computer system will carry out this? Explain how.
4.Write about various General Purpose Registers involved in the typical computer system
5.What is the role of Processor clock, clock rate in the performance of computer system? Explain.
6.Explain the importance of instruction set in measuring the performance of a computer system.
7.Discuss the generations of computers based on the development technologies used to fabricate the
processors, memories an I/O units.
14