o o o o o o o
g for Performance (11th Edition). Stallings
o o o o o
TABLEoOFoCONTENTS
Chaptero1o Introduction ........................................................................................... 5
Chaptero2o ComputeroEvolutionoandoPerformance .............................................. 6
Chaptero3o ComputeroFunctionoandoInterconnection......................................... 14
Chaptero4o CacheoMemory .................................................................................... 19
Chaptero5o InternaloMemory ................................................................................. 32
Chaptero6o ExternaloMemory ................................................................................ 38
Chaptero7o Input/Output........................................................................................ 43
Chaptero8o OperatingoSystemoSupport................................................................. 50
Chaptero9o ComputeroArithmetic ......................................................................... 57
Chaptero10o InstructionoSets:oCharacteristicsoandoFunctions ............................ 69
Chaptero11o InstructionoSets:oAddressingoModesoandoFormats ........................ 80
Chaptero12o ProcessoroStructureoandoFunction ................................................... 85
Chaptero13o ReducedoInstructionoSetoComputers............................................... 92
Chaptero14o Instruction-LeveloParallelismoandoSuperscalaroProcessors.......... 97
Chaptero15o ControloUnitoOperation .................................................................. 103
Chaptero16o MicroprogrammedoControl ........................................................... 106
Chaptero17o ParalleloProcessing .......................................................................... 109
Chaptero18o MulticoreoComputers ..................................................................... 118
Chaptero19o NumberoSystems ............................................................................. 121
Chaptero20o DigitaloLogic..................................................................................... 122
Chaptero21o TheoIA-64oArchitecture ................................................................... 126
AppendixoBo AssemblyoLanguageoandoRelatedoTopics ................................... 130
-4-
, CHAPTER 1 INTRODUCTION O O
ANSW ERS
o o o o o o o TO o o QU E S T I O N S
o o o o o o o o o
1.1 Computeroarchitectureorefersotoothoseoattributesoofoaosystemovisibleotooaoprogramm
eroor,oputoanotheroway,othoseoattributesothatohaveoaodirectoimpactoonotheologicaloexe
cutionoofoaoprogram.oComputeroorganizationorefersotootheooperationalounitsoandoth
eirointerconnectionsothatorealizeotheoarchitecturalospecifications.oExamplesoofoarchit
ecturaloattributesoincludeotheoinstructionoset,otheonumberoofobitsousedotoorepresento
variousodataotypeso(e.g.,onumbers,ocharacters),oI/Oomechanisms,oandotechniquesofor
oaddressingomemory.oOrganizationaloattributesoincludeothoseohardwareodetailsotra
nsparentotootheoprogrammer,osuchoasocontrolosignals;ointerfacesobetweenotheocomp
uteroandoperipherals;oandotheomemoryotechnologyoused.
1.2 Computerostructureorefersotootheowayoinowhichotheocomponentsoofoaocomputeroareo
interrelated.oComputerofunctionorefersotootheooperationoofoeachoindividualocompo
nentoasopartoofotheostructure.
1.3 Dataoprocessing;odataostorage;odataomovement;oandocontrol.
1.4 Centraloprocessingounito(CPU):oControlsotheooperationoofotheocomputeroando
performsoitsodataoprocessingofunctions;ooftenosimplyoreferredotooasoprocessor.o
Mainomemory:oStoresodata.
I/O:oMovesodataobetweenotheocomputeroandoitsoexternaloenvironment.oSyste
mointerconnection:oSomeomechanismothatoprovidesoforocommunicationoamon
goCPU,omainomemory,oandoI/O.oAocommonoexampleoofosystem
interconnectionoisobyomeansoofoaosystemobus,oconsistingoofoaonumberoofoconductingo
wiresotoowhichoallotheootherocomponentsoattach.
1.5 Controlounit:oControlsotheooperationoofotheoCPUoandohenceotheocomputeroA
rithmeticoandologicounito(ALU):oPerformsotheocomputer’sodataoprocessingofu
nctions
Registers:oProvidesostorageointernalotootheoCPU
CPUointerconnection:oSomeomechanismothatoprovidesoforocommunicationoamongot
heocontrolounit,oALU,oandoregisters
-5-
, CHAPTER 2 COMPUTER EVOLUTION AND
O O O O
PERFORMANCE
ANSW ERS
o o o o o o o TO
o o QU E S T I O N S
o o o o o o o o o
2.1 Inoaostoredoprogramocomputer,oprogramsoareorepresentedoinoaoformosuitableoforostori
ngoinomemoryoalongsideotheodata.oTheocomputerogetsoitsoinstructionsobyoreadingothe
mofromomemory,oandoaoprogramocanobeosetooroalteredobyosettingotheovaluesoofoaoporti
onoofomemory.
2.2 Aomainomemory,owhichostoresobothodataoandoinstructions:oanoarithmeticoandologico
unito(ALU)ocapableoofooperatingoonobinaryodata;oaocontrolounit,owhichointerpretsoth
eoinstructionsoinomemoryoandocausesothemotoobeoexecuted;oandoinputoandooutputo(I/
O)oequipmentooperatedobyotheocontrolounit.
2.3 Gates,omemoryocells,oandointerconnectionsoamongogatesoandomemoryocells.
2.4 Mooreoobservedothatotheonumberoofotransistorsothatocouldobeoputoonoaosingleochipo
wasodoublingoeveryoyearoandocorrectlyopredictedothatothisopaceowouldocontinueoi
ntootheonearofuture.
2.5 Similarooroidenticaloinstructionoset:oInomanyocases,otheosameosetoofomachineoinstr
uctionsoisosupportedoonoallomembersoofotheofamily.oThus,oaoprogramothatoexecuteso
onooneomachineowilloalsooexecuteoonoanyoother.oSimilarooroidenticalooperatingosy
stem:oTheosameobasicooperatingosystemoisoavailableoforoallofamilyomembers.oIncrea
singospeed:oTheorateoofoinstructionoexecutionoincreasesoinogoingofromolowerotoohig
herofamilyomembers.oIncreasingoNumberoofoI/Ooports:oInogoingofromolowerotoohig
herofamilyomembers.oIncreasingomemoryosize:oInogoingofromolowerotoohigherofam
ilyomembers.oIncreasingocost:oInogoingofromolowerotoohigherofamilyomembers.
2.6 Inoaomicroprocessor,oalloofotheocomponentsoofotheoCPUoareoonoaosingleochip.
ANSW ERS
o o o o o o o TO
o o PRO BLEMS
o o o o o o o o
2.1 Thisoprogramoisodevelopedoino[HAYE98].o TheovectorsoA,oB,oandoCoareoeachostoredoi
no1,000ocontiguousolocationsoinomemory,obeginningoatolocationso1001,o2001,oando30
01,orespectively.oTheoprogramobeginsowithotheoleftohalfoofolocationo3.oAocountingova
riableoNoisosetotoo999oandodecrementedoafteroeachostepountiloitoreacheso–
1.oThus,otheovectorsoareoprocessedofromohigholocationotoolowolocation.
-6-
, Location Instruction Comments
0 999 Constanto(countoN)
1 1 Constant
2 1000 Constant
3L LOAD M(2000) TransferoA(I)otooAC
3R ADDoM(3000) Computeo A(I)o +o B(I)
4L STORoM(4000) TransferosumotooC(I)
4R LOADoM(0) LoadocountoN
5L SUBoM(1) DecrementoNobyo1
5R JUMP+o M(6,o 20:39) TestoNoandobranchotoo6Roifononnegative
6L JUMPoM(6,o0:19) Halt
6R STORoM(0) UpdateoN
7L ADDoM(1) IncrementoACobyo1
7R ADDoM(2)
8L STORoM(3,o8:19) Modifyoaddressoino3L
8R ADDoM(2)
9L STORoM(3,o28:39) Modifyoaddressoino3R
9R ADDoM(2)
10L STORoM(4,o8:19) Modifyoaddressoino4L
10R JUMPoM(3,o0:19) Branchotoo3L
2.2 a.
Opcode Operand
00000001 000000000010
b.o First,otheoCPUomustomakeoaccessomemoryotoofetchotheoinstruction.oTheoinstructio
nocontainsotheoaddressoofotheodataoweowantotooload.oDuringotheoexecuteophaseoacc
essesomemoryotooloadotheodataovalueolocatedoatothatoaddressoforoaototaloofotwootrip
sotoomemory.
2.3
Tooreadoaovalueofromomemory,otheoCPUoputsotheoaddressoofotheovalueoitowantso
intootheoMAR.oTheoCPUothenoassertsotheoReadocontrololineotoomemoryoandoplacesoth
eoaddressoonotheoaddressobus.oMemoryoplacesotheocontentsoofotheomemoryolocationo
passedoonotheodataobus.oThisodataoisothenotransferredotootheoMBR.oToowriteoaovalueot
oomemory,otheoCPUoputsotheoaddressoofotheovalueoitowantsotoowriteointootheoMAR.oT
heoCPUoalsooplacesotheodataoitowantsotoowriteointootheoMBR.oTheoCPUothenoassertsoth
eoWriteocontrololineotoomemoryoandoplacesotheoaddressoonotheoaddressobusoandotheo
dataoonotheodataobus.oMemoryotransfersotheodataoonotheodataobusointootheocorrespon
dingomemoryolocation.
-7-