Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
College aantekeningen

Computer Architecture All units

Beoordeling
-
Verkocht
-
Pagina's
90
Geüpload op
02-05-2023
Geschreven in
2021/2022

This Document has All the Concepts which are covered in the subject computer architecture this will be an useful

Instelling
Vak

Voorbeeld van de inhoud

CS8491-Computer Architecture Department of CSE & IT
UNIT I BASIC STRUCTURE OF A COMPUTER SYSTEM
Functional Units – Basic Operational Concepts – Performance – Instructions: Language of the Computer –
Operations, Operands – Instruction representation – Logical operations – Decision making – MIPS
Addressing.
FUNCTIONAL UNITS OF COMPUTER SYSTEM
A computer consists of five functionally independent main parts Input, Memory, Arithmetic and Logic unit
(ALU), Output and Control unit.




Input device accepts the coded information as source program i.e. high level language. This is either
stored in the memory or immediately used by the processor to perform the desired operations. The
program stored in the memory determines the processing steps. Basically the computer converts one source
program to an object program. i.e. into machine language.
Finally the results are sent to the outside world through output device. All of these actions are
coordinated by the control unit.
Input unit: - The source program/high level language program/coded information/simply data is fed to a
computer through input devices keyboard is a most common type. Whenever a key is pressed, one
corresponding word or number is translated into its equivalent binary code over a cable & fed either to
memory or processor.
Example:- Joysticks, trackballs, mouse, scanners etc are other input devices.
Memory unit: - Its function into store programs and data. It is basically to two types
1. Primary memory
2. Secondary memory
1. Primary memory: - It Is the one exclusively associated with the processor and operates at the electronics
speeds programs must be stored in this memory while they are being executed. The memory contains a
large number of semiconductors storage cells. Each capable of storing one bit of information. These are
processed in a group of fixed site called word.
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 random-access memory (RAM).
The time required to access one word in called memory access time. Memory which is only readable
by the user and contents of which can‘t be altered is called read only memory (ROM) it contains operating
system. Caches are the small fast RAM units, which are coupled with the processor and are often contained
on the same IC chip to achieve high performance. Although primary storage is essential it tends to be
expensive.
2 Secondary memory: - Is used where large amounts of data & programs have to be stored, particularly
information that is accessed infrequently.
Examples: - Magnetic disks & tapes, optical disks (ie CD-ROM‘s), floppies etc.,
Arithmetic logic unit (ALU):-
Most of the computer operators are executed in ALU of the processor like addition, subtraction,
division, multiplication, etc. the operands are brought into the ALU from memory and stored in high speed
storage elements called register. Then according to the instructions the operation is performed in the
required sequence.
The control and the ALU are may times faster than other devices connected to a computer system.
This enables a single processor to control a number of external devices such as key boards, displays,

St. Joseph’s College of Engineering & St. Joseph’s Institute of Technology Page 1 of 90

,CS8491-Computer Architecture Department of CSE & IT
magnetic and optical disks, sensors and other mechanical controllers.
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:-
It effectively is the nerve center that sends signals to other units and senses their states. The actual
timing signals that govern the transfer of data between input unit, processor, memory and output unit are
generated by the control unit.
BASIC OPERATIONAL CONCEPTS
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 stored are also stored in the memory.
Examples: - Add LOCA, R0
This instruction adds the operand at memory location LOCA, to operand in register R0 & places the
sum into register. This instruction requires the performance of several steps,
1. First the instruction is fetched from the memory into the processor
2. The operand at LOCA is fetched and added to the contents of R0
3. Finally the resulting sum is stored in the register R0
The preceding add instruction combines a memory access operation with an ALU Operations. In
some other type of computers, these two types of operations are performed by separate instructions for
performance reasons.
Load LOCA, R1
Add R1, R0
Transfers between the memory and the processor are started by sending the address of the memory
location to be accessed to the memory unit and issuing the appropriate control signals. The data are then
transferred to or from the memory. CONTROL ALU … n- GPRs




Fig : Connections between the processor and the memory
The fig shows how memory & the processor can be connected. In addition to the ALU & 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. MAR PC IR MEMORY MDR R0 R1 …



St. Joseph’s College of Engineering & St. Joseph’s Institute of Technology Page 2 of 90

,CS8491-Computer Architecture Department of CSE & IT
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.
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.
Normal execution of a program may be preempted (temporarily interrupted) if some devices require
urgent servicing, to do this one device raises an Interrupt signal.
An interrupt is a request signal from an I/O device for service by the processor. The processor
provides the requested service by executing an appropriate interrupt service routine.
The Diversion may change the internal stage of the processor its state must be saved in the memory
location before interruption. When the interrupt-routine service is completed the state of the processor is
restored so that the interrupted program may continue.
CPU PERFORMANCE
The machine (or CPU) is said to be faster or has better performance running this program if the total
execution time is shorter.
 Thus the inverse of the total measured program execution time is a possible performance measure
or metric: PerformanceA = 1 / Execution TimeA
 CPU performance
seconds cycles seconds
 
program program cycle
 Instruction performance
CPU clock cycles = Instructions for a program  Average clock cycles per instruction
 CPU Time
 doesn't count I/O or time spent running other programs
 can be broken up into system time, and user time
CPU time = Instruction Count  CPI  Clock Cycle Time
PERFORMANCE
If you were running a program on two different desktop computers, you‘d say that the faster one is
the desktop computer that gets the job done first. If you were running a datacenter that had several servers
running jobs submitted by many users, you‘d say that the faster computer was the one that completed the
most jobs during a day.
As an individual computer user, you are interested in reducing response time—the time between the
start and completion of a task—also referred to as execution time.
Datacenter managers are often interested in increasing throughput or bandwidth— the total amount
of work done in a given time

St. Joseph’s College of Engineering & St. Joseph’s Institute of Technology Page 3 of 90

, CS8491-Computer Architecture Department of CSE & IT
To maximize performance, we want to minimize response time or execution time for some task.
Thus, we can relate performance and execution time for a computer X:




Measuring Performance
CPU execution time Also called CPU time. The actual time the CPU spends computing for a specific task.
User CPU time The CPU time spent in a program itself.
System CPU time The CPU time spent in the operating system performing tasks on behalf of the program.
CPU Performance and Its Factors
Since we are confining ourselves to CPU performance at this point, the bottom-line performance measure is
CPU execution time. A simple formula relates the most basic metrics (clock cycles and clock cycle time) to
CPU time:




Instruction Performance
The performance equations above did not include any reference to the number of instructions needed for
the program. (We‘ll see what the instructions that make up a program look like in the next chapter.)
However, since the compiler clearly generated instructions to execute, and the computer had to execute the
instructions to run the program, the execution time must depend on the number of instructions in a
program. One way to think about execution time is that it equals the number
of instructions executed multiplied by the average time per instruction. Therefore, the number of clock
cycles required for a program can be written as




The term clock cycles per instruction, which is the average number of clock cycles each instruction takes to
execute, is often abbreviated as CPI. Since different instructions may take different amounts of time
depending on what they do, CPI is an average of all the instructions executed in the program. CPI provides
one way of comparing two different implementations of the same instruction set architecture, since the
number of instructions executed for a program will, of course, be the same.
St. Joseph’s College of Engineering & St. Joseph’s Institute of Technology Page 4 of 90

Geschreven voor

Instelling
Vak

Documentinformatie

Geüpload op
2 mei 2023
Aantal pagina's
90
Geschreven in
2021/2022
Type
College aantekeningen
Docent(en)
Sathya
Bevat
Alle colleges

Onderwerpen

€8,23
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper
Seller avatar
samemmanuel

Maak kennis met de verkoper

Seller avatar
samemmanuel st josephs college of engineering
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
-
Lid sinds
3 jaar
Aantal volgers
0
Documenten
2
Laatst verkocht
-

0,0

0 beoordelingen

5
0
4
0
3
0
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen