0% found this document useful (0 votes)
39 views

U1-3-Functional Units, Bus Structures, Software Performance

The document discusses the basic functional units of a computer system: input, memory, processing, output, and control. It describes each unit's role, with memory storing instructions and data, processing performing arithmetic and logical operations, and control coordinating all other units. The document also covers basic operational concepts like instructions governing computer tasks and data being operands for those instructions.

Uploaded by

Meenu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

U1-3-Functional Units, Bus Structures, Software Performance

The document discusses the basic functional units of a computer system: input, memory, processing, output, and control. It describes each unit's role, with memory storing instructions and data, processing performing arithmetic and logical operations, and control coordinating all other units. The document also covers basic operational concepts like instructions governing computer tasks and data being operands for those instructions.

Uploaded by

Meenu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

CHRIST

Deemed to be University

COMPUTER ORGANIATION AND


PROCESSORS

• Aswatha Kumar M.,


• Faculty, Dept. of ECE

1
Excellence and Service
CHRIST
Deemed to be University

Functional Units,
Basic Operational Concepts

Ref: Computer Organization, 5th Ed., Carl Hamacher

2
Excellence and Service
FUNCTIONAL UNITS
• A computer consists of five functionally independent
main parts as shown in Figure 1.1 :
– input,
– memory,
– Processing,
– output, and
– control units,
• The input unit accepts coded information from either
human operators or from other input devices.
• The information received can be used
– For Storage or
– by ALU to perform the desired operations

11:46:58 EC434 - C O & P 3


• The processing steps are determined by a program
stored in the memory.
• At the end, the results are sent back to the outside
world through the output unit
• All of these actions are coordinated by the control
unit.
• We refer to the arithmetic and logic circuits, in
conjunction with the main control circuits, as the
processor,
• Input and Output equipment is often collectively
referred to as the input-output (I/O) unit.

11:46:58 EC434 - C O & P 4


• Information to the computer is categorized as either
instructions or data.
• Instructions are explicit commands that
– Govern the transfer of information within a computer or
between computer and external devices(computer or I/O
devices)
– Specify the arithmetic and logic operations to be
performed
• A list of instructions that performs a task is called as
program.
• In general, the program is stored in the memory.
• The processor fetches instructions from the memory
and performs the desired operations.
11:46:58 EC434 - C O & P 5
• Data are numbers and encoded characters that are
used as operands by the instructions.
• Within this definition of data, an entire program may
be considered as data if it is to be processed by
another program.
• The source program is the input data to the compiler
program which translates the source program into a
machine language program.

11:46:58 EC434 - C O & P 6


• Information handled by a computer will be encoded
in a suitable format. Most present-day hardware
employs digital circuits that have only two stable
states, ON and OFF.
• Each number, character, or instruction is encoded as
a string of binary digits called bits, each having one
of two possible values, 0 or 1.
• Numbers are usually represented in positional binary
notation. Occasionally, the binary-coded decimal
(BCD) format is employed.

11:46:58 EC434 - C O & P 7


• Alphanumeric characters are also expressed in terms
of binary codes.
• Two of the most widely used schemes are -
• ASCII (American Standard code for Information
interchange), in which each character is represented
as a 7-bit code, and
• EBCDIC (Extended Binary-Coded Decimal Interchange
Code), in which eight bits are used to denote a
character.

11:46:58 EC434 - C O & P 8


ASCII Character set

11:46:58 EC434 - C O & P 9


EBCDIC character set

11:46:58 EC434 - C O & P 10


Recall
• What is the major disadvantage of Von Neumann
architecture?
• What are the three kinds of instructions?
• What is program?
• Where do Instructions stored in the computer for the
execution?
• Name the two character sets used

11:46:58 EC434 - C O & P 11


Input Unit
• Computers accept coded information through input unit,
which read the data.
• The most well-known input device is the keyboard.
– Whenever a key is pressed, the corresponding letter or digit is
automatically translated into its corresponding binary code and
transmitted over a cable to either the memory or the processor.
• Other kinds of input devices are
– joysticks, trackballs, and mouses. These are often used as
graphic input devices in conjunction with displays.
• Microphones can be used to capture audio input which is
then sampled and converted into digital codes for
storage and processing.

11:46:58 EC434 - C O & P 12


Memory Unit
• The function of the memory unit is to store programs
and data.
• There are two classes of storage:
• Primary storage
– is a fast memory that operates at electronic speed
– Hold the instructions that are being executed.
– Contains a large number of semiconductor storage cells,
each capable of storing one bit of information.
– Group of cells called word will be processed instead of bits.
• Secondary storage
– Bulk in size
– May hold programs and data

11:46:58 EC434 - C O & P 13


• 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.
• Small machines – have few tens of millions of words,
• Medium and large machines – many tens to hundreds
of millions of words.
• Data are usually processed within a machine in units
of words, multiples of words, or parts of words.

11:46:58 EC434 - C O & P 14


• When the memory is accessed, usually only one
word of data is read or written.
• Programs must reside in the memory during
execution. Instructions and data can be written into
the memory or read out under the control of the
processor.
• Memory in which any location can be reached in a
short and fixed amount of time after specifying its
address is called random-access memory (RAM).

11:46:58 EC434 - C O & P 15


• The time required to access one word is called the
memory access time.
• It general, ranging from a few nanoseconds (ns) to
about 100 ns for modem RAM units.
• The largest and slowest unit is referred to as the
main memory.
• The small, fast, RAM units are called caches.

11:46:58 EC434 - C O & P 16


• Although primary storage is essential, it tends to be
expensive.
• Secondary storage (Cheaper) is used when large
amounts of data and many programs have to be
stored
• A wide selection of secondary storage devices are
available, including magnetic disks and tapes and
optical disks (CD-ROMs).

11:46:58 EC434 - C O & P 17


Arithmetic and Logic Unit
• Most computer operations are executed in the
arithmetic and logic unit (ALU) of the processor.
• Ex:
– Let two numbers located in the memory are to be added.
– They are brought into the processor, and the actual
addition is carried out by the ALU.
– The sum may then be stored in the 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.
• The control and the ALU units are many times faster
than other devices connected to a computer system.
11:46:58 EC434 - C O & P 18
Output Unit
• The output unit is to send processed results to the
outside world. Ex: printer.
• Printers employ mechanical impact heads, inkjet
streams, or photocopying techniques, as in laser
printers, to perform the printing.
• It is possible to produce printers capable of printing
as many as 10,000 lines per minute.

11:46:58 EC434 - C O & P 19


Control Unit
• The operation of all the units of computer must be
coordinated by the unit called control unit - nerve
center of the system.
• Much of the control circuitry is physically distributed
throughout the machine.
• A large set of control lines (wires) carries the signals
used for timing and synchronization of events in all
units.

11:46:58 EC434 - C O & P 20


• The operation of a computer can be summarized as
follows:
– The computer accepts information in the 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 arithmetic and logic unit, where it
is processed.
– Processed information leaves the computer through an
output unit.
– All activities inside the machine are directed by the control
unit.

11:46:58 EC434 - C O & P 21


BASIC OPERATIONAL CONCEPTS
• Activity in a computer is governed by instructions.
• To perform a given task, an appropriate program
consisting of a list of instructions is stored in the
memory.
• Individual instructions are brought from the memory
into the processor, which executes the specified
operations.
• Data to be used as operands are also stored in the
memory. A typical instruction may be
Add LOCA, RO

11:46:58 EC434 - C O & P 22


BASIC OPERATIONAL CONCEPTS Contd . . .
• The original contents of location LOCA is preserved,
whereas those of RO are overwritten.
• This instruction requires the performance of several
steps. First, the instruction is fetched from the
memory into the processor.
• Next, the operand at LOCA is fetched and added to
the contents of RO. Finally, the resulting sum is
stored in register RO.

11:46:58 EC434 - C O & P 23


BASIC OPERATIONAL CONCEPTS Contd . . .
• Figure 1.2 shows how the Memory
memory and the processor
can be connected.

• It also shows a few essential


operational details of the MAR MDR
processor that have not been Control

discussed yet.
• The interconnection pattern
for these components is not
ALU
shown explicitly since here
we discuss only their
functional characteristics.
11:46:58 EC434 - C O & P 26
BASIC OPERATIONAL CONCEPTS Contd . . .
• Registers facilitate communication with the memory

– MAR – holds the address of the location to be accessed.
– MDR – contains the data to be load/store from/to
memory.
• Execution of the program is as follows:
– PC is set to first instruction address
– The addressed word is read and loaded to MDR
– Content of MDR is transferred to IR

11:46:58 EC434 - C O & P 28


BASIC OPERATIONAL CONCEPTS Contd . . .
• If the instruction involves an ALU, it will obtain the
required operands.
• Once operands are fetched, the ALU can perform the
desired operation.
• If the result of this operation is to be stored in the
memory, then the result is sent to the MDR.
• It initials the location through MAR followed by write
operation with MDR.
• Once the execution of the current instruction is
completed, next instruction fetch may be started.

11:46:58 EC434 - C O & P 29


Special Attention
• The processor provides the requested service by
executing an appropriate interrupt-service routine
(ISR).
• Current status need to be stored before initiation of
interrupt service routine.
• Normally, the contents of the PC, the general
registers, and some control information are stored in
memory.
• When the interrupt-service routine is completed, the
state of the processor is restored so that the
interrupted program may continue.
11:46:58 EC434 - C O & P 31
•Questions?
•Thank you!

11:46:58 EC434 - C O & P 32


Recall 18-01-23

• So far, we have discussed the functions of individual


parts of a computer.
• Different ways to connect the above parts.
• Agenda
• BUS structure

11:46:58 EC434 - C O & P 33


Bus Structures
CHRIST
Deemed to be University

BUS
• One way to achieve reasonable speed, a computer
must be organized so that it can handle one unit of
data (word) at a given time.
• i.e. parallel data with parallel wires (referred as bus)
• Different types of information being transferred
between processing unit and memory unit are
• Transferring the data
• Transfer of address and
• Transfer of control signals

35
Excellence and Service
Simple BUS
• The simplest way to interconnect functional units is
to use a single bus, as shown in Figure 1.3.

Input Output Memory Processor

• All units are connected, only one transfer at a time


between two units.
• Bus control lines are used to arbitrate multiple requests
for use of the bus.

11:46:58 EC434 - C O & P 36


• Advantage of the single-bus structure – low cost, flexible to
add peripheral devices.
• Systems that contain multiple buses achieve more
concurrency in operations by allowing two or more transfers
to be carried out at the same time.
• This leads to better performance but at an increased cost.
• The devices connected to a bus
– electromechanical devices – keyboards, printers – slow
– magnetic or optical disks, are considerably faster.
• Efficient transfer mechanism is to be used to achieve
better efficiency.

11:46:58 EC434 - C O & P 37


Software Performance
• For user to enter and run a program, system should
contain a software, called, system software
• It perform the following functions:
1. Receiving and interpreting user commands
2. Entering and editing application programs and storing them as files
in secondary storage devices
3. Managing the storage and retrieval of files in secondary storage
devices
4. Running standard application programs such as word processors,
spreadsheets, or games, with data supplied by the user
5. Controlling I/O units to receive input information and produce
output results
6. Translating programs from source form prepared by the user into
object form consisting of machine instructions
7. Linking and running user-written application programs with existing
standard library routines, such as numerical computation packages

11:46:58 EC434 - C O & P 38


• Most of the application programs are written in
higher level languages
• Programmer need not know the details of machine
program instructions
• System software, compiler, translates higher level
language to machine level language
• Application programs – text editor

11:46:58 EC434 - C O & P 39


User program and OS routine sharing of the processor.

t0 t1 t2 t3 t4 t5
TIME

11:46:58 EC434 - C O & P 40


Performance measures
• Speed, total time to execute a program
• How quick the data is accessed

MAIN
MEMORY Cache Processor
Memory

• Compiler (translation of HLL to optimum LLL)

11:46:58 EC434 - C O & P 41


Performance equations
• Let T be the processor time required to execute a
program
• The compiler generates a machine language object
program that corresponds to the source program
• Assume that complete execution of the program requires
the execution of N machine language instructions.
• Some instructions may be executed multiple times
• Let the average number of basic steps to execute one
machine instruction is S,(each basic step in one clock
cycle.
• If the clock rate is R cycles per second, the program
execution time is given by
NxS
T=
R
11:46:58 EC434 - C O & P 42
CHRIST
Deemed to be University

43
Excellence and Service

You might also like