计算机组织与结构英文版课后答案.docx

上传人:b****4 文档编号:6143067 上传时间:2023-05-09 格式:DOCX 页数:73 大小:773.49KB
下载 相关 举报
计算机组织与结构英文版课后答案.docx_第1页
第1页 / 共73页
计算机组织与结构英文版课后答案.docx_第2页
第2页 / 共73页
计算机组织与结构英文版课后答案.docx_第3页
第3页 / 共73页
计算机组织与结构英文版课后答案.docx_第4页
第4页 / 共73页
计算机组织与结构英文版课后答案.docx_第5页
第5页 / 共73页
计算机组织与结构英文版课后答案.docx_第6页
第6页 / 共73页
计算机组织与结构英文版课后答案.docx_第7页
第7页 / 共73页
计算机组织与结构英文版课后答案.docx_第8页
第8页 / 共73页
计算机组织与结构英文版课后答案.docx_第9页
第9页 / 共73页
计算机组织与结构英文版课后答案.docx_第10页
第10页 / 共73页
计算机组织与结构英文版课后答案.docx_第11页
第11页 / 共73页
计算机组织与结构英文版课后答案.docx_第12页
第12页 / 共73页
计算机组织与结构英文版课后答案.docx_第13页
第13页 / 共73页
计算机组织与结构英文版课后答案.docx_第14页
第14页 / 共73页
计算机组织与结构英文版课后答案.docx_第15页
第15页 / 共73页
计算机组织与结构英文版课后答案.docx_第16页
第16页 / 共73页
计算机组织与结构英文版课后答案.docx_第17页
第17页 / 共73页
计算机组织与结构英文版课后答案.docx_第18页
第18页 / 共73页
计算机组织与结构英文版课后答案.docx_第19页
第19页 / 共73页
计算机组织与结构英文版课后答案.docx_第20页
第20页 / 共73页
亲,该文档总共73页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

计算机组织与结构英文版课后答案.docx

《计算机组织与结构英文版课后答案.docx》由会员分享,可在线阅读,更多相关《计算机组织与结构英文版课后答案.docx(73页珍藏版)》请在冰点文库上搜索。

计算机组织与结构英文版课后答案.docx

计算机组织与结构英文版课后答案

SolutionsManual

 

COMPUTERORGANIZATIONANDARCHITECTURE

DesigningforPerformance

SeventhEdition

 

WilliamStallings

Copyright2005:

WilliamStallings

 

©2005byWilliamStallings

Allrightsreserved.Nopartofthisdocumentmaybereproduced,inanyformorbyanymeans,orpostedontheInternet,withoutpermissioninwritingfromtheauthor.

 

Notice

 

ThismanualcontainssolutionstoallofthereviewquestionsandhomeworkproblemsinComputerOrganizationandArchitecture,SeventhEdition.Ifyouspotanerrorinasolutionorinthewordingofaproblem,Iwouldgreatlyappreciateitifyouwouldforwardtheinformationviaemailtows@.Anerratasheetforthismanual,ifneeded,isavailableatWilliamS

W.S.

 

TABLEOFCONTENTS

Chapter2:

ComputerEvolutionandPerformance5

Chapter3:

ComputerFunctionandInterconnection9

Chapter4:

CacheMemory14

Chapter5:

InternalMemory27

Chapter6:

ExternalMemory33

Chapter7:

Input/Output37

Chapter8:

OperatingSystemSupport43

Chapter9:

ComputerArithmetic48

Chapter10:

InstructionSets:

CharacteristicsandFunctions61

Chapter11:

InstructionSets:

AddressingModesandFormats72

Chapter12:

ProcessorStructureandFunction77

Chapter13:

ReducedInstructionSetComputers(RISCs)83

Chapter14:

Instruction-LevelParallelismandSuperscalarProcessors87

Chapter15:

TheIA-64Architecture93

Chapter16:

ControlUnitOperation97

Chapter17:

MicroprogrammedControl100

Chapter18:

ParallelProcessing103

AppendixA:

NumberSystems112

AppendixB:

DigitalLogic113

Chapter2

ComputerEvolutionandPerformance

AnswerstoQuestions

2.1Inastoredprogramcomputer,programsarerepresentedinaformsuitableforstoringinmemoryalongsidethedata.Thecomputergetsitsinstructionsbyreadingthemfrommemory,andaprogramcanbesetoralteredbysettingthevaluesofaportionofmemory.

2.2Amainmemory,whichstoresbothdataandinstructions:

anarithmeticandlogicunit(ALU)capableofoperatingonbinarydata;acontrolunit,whichinterpretstheinstructionsinmemoryandcausesthemtobeexecuted;andinputandoutput(I/O)equipmentoperatedbythecontrolunit.

2.3Gates,memorycells,andinterconnectionsamonggatesandmemorycells.

2.4Mooreobservedthatthenumberoftransistorsthatcouldbeputonasinglechipwasdoublingeveryyearandcorrectlypredictedthatthispacewouldcontinueintothenearfuture.

2.5Similaroridenticalinstructionset:

Inmanycases,thesamesetofmachineinstructionsissupportedonallmembersofthefamily.Thus,aprogramthatexecutesononemachinewillalsoexecuteonanyother.Similaroridenticaloperatingsystem:

Thesamebasicoperatingsystemisavailableforallfamilymembers.Increasingspeed:

Therateofinstructionexecutionincreasesingoingfromlowertohigherfamilymembers.IncreasingNumberofI/Oports:

Ingoingfromlowertohigherfamilymembers.Increasingmemorysize:

Ingoingfromlowertohigherfamilymembers.Increasingcost:

Ingoingfromlowertohigherfamilymembers.

2.6Inamicroprocessor,allofthecomponentsoftheCPUareonasinglechip.

AnswerstoProblems

2.1Thisprogramisdevelopedin[HAYE98].ThevectorsA,B,andCareeachstoredin1,000contiguouslocationsinmemory,beginningatlocations1001,2001,and3001,respectively.Theprogrambeginswiththelefthalfoflocation3.AcountingvariableNissetto999anddecrementedaftereachstepuntilitreaches–1.Thus,thevectorsareprocessedfromhighlocationtolowlocation.

Location

Instruction

Comments

0

999

Constant(countN)

1

1

Constant

2

1000

Constant

3L

LOADM(2000)

TransferA(I)toAC

3R

ADDM(3000)

ComputeA(I)+B(I)

4L

STORM(4000)

TransfersumtoC(I)

4R

LOADM(0)

LoadcountN

5L

SUBM

(1)

DecrementNby1

5R

JUMP+M(6,20:

39)

TestNandbranchto6Rifnonnegative

6L

JUMPM(6,0:

19)

Halt

6R

STORM(0)

UpdateN

7L

ADDM

(1)

IncrementACby1

7R

ADDM

(2)

8L

STORM(3,8:

19)

Modifyaddressin3L

8R

ADDM

(2)

9L

STORM(3,28:

39)

Modifyaddressin3R

9R

ADDM

(2)

10L

STORM(4,8:

19)

Modifyaddressin4L

10R

JUMPM(3,0:

19)

Branchto3L

2.2a.

Opcode

Operand

00000001

000000000010

b.First,theCPUmustmakeaccessmemorytofetchtheinstruction.Theinstructioncontainstheaddressofthedatawewanttoload.Duringtheexecutephaseaccessesmemorytoloadthedatavaluelocatedatthataddressforatotaloftwotripstomemory.

2.3Toreadavaluefrommemory,theCPUputstheaddressofthevalueitwantsintotheMAR.TheCPUthenassertstheReadcontrollinetomemoryandplacestheaddressontheaddressbus.Memoryplacesthecontentsofthememorylocationpassedonthedatabus.ThisdataisthentransferredtotheMBR.Towriteavaluetomemory,theCPUputstheaddressofthevalueitwantstowriteintotheMAR.TheCPUalsoplacesthedataitwantstowriteintotheMBR.TheCPUthenassertstheWritecontrollinetomemoryandplacestheaddressontheaddressbusandthedataonthedatabus.Memorytransfersthedataonthedatabusintothecorrespondingmemorylocation.

2.4

Address

Contents

08A

08B

08C

08D

LOADM(0FA)

STORM(0FB)

LOADM(0FA)

JUMP+M(08D)

LOAD–M(0FA)

STORM(0FB)

Thisprogramwillstoretheabsolutevalueofcontentatmemorylocation0FAintomemorylocation0FB.

2.5Alldatapathsto/fromMBRare40bits.Alldatapathsto/fromMARare12bits.Pathsto/fromACare40bits.Pathsto/fromMQare40bits.

2.6Thepurposeistoincreaseperformance.Whenanaddressispresentedtoamemorymodule,thereissometimedelaybeforethereadorwriteoperationcanbeperformed.Whilethisishappening,anaddresscanbepresentedtotheothermodule.Foraseriesofrequestsforsuccessivewords,themaximumrateisdoubled.

2.7Thediscrepancycanbeexplainedbynotingthatothersystemcomponentsasidefromclockspeedmakeabigdifferenceinoverallsystemspeed.Inparticular,memorysystemsandadvancesinI/Oprocessingcontributetotheperformanceratio.Asystemisonlyasfastasitsslowestlink.Inrecentyears,thebottleneckshavebeentheperformanceofmemorymodulesandbusspeed.

2.8AsnotedintheanswertoProblem2.7,eventhoughtheIntelmachinemayhaveafasterclockspeed(2.4GHzvs.1.2GHz),thatdoesnotnecessarilymeanthesystemwillperformfaster.Differentsystemsarenotcomparableonclockspeed.Otherfactorssuchasthesystemcomponents(memory,buses,architecture)andtheinstructionsetsmustalsobetakenintoaccount.Amoreaccuratemeasureistorunbothsystemsonabenchmark.Benchmarkprogramsexistforcertaintasks,suchasrunningofficeapplications,performingfloatingpointoperations,graphicsoperations,andsoon.Thesystemscanbecomparedtoeachotheronhowlongtheytaketocompletethesetasks.AccordingtoAppleComputer,theG4iscomparableorbetterthanahigher-clockspeedPentiumonmanybenchmarks.

2.9Thisrepresentationiswastefulbecausetorepresentasingledecimaldigitfrom0through9weneedtohavetentubes.IfwecouldhaveanarbitrarynumberofthesetubesONatthesametime,thenthosesametubescouldbetreatedasbinarybits.Withtenbits,wecanrepresent210patterns,or1024patterns.Forintegers,thesepatternscouldbeusedtorepresentthenumbersfrom0through1023.

2.10

Ic

p

m

k

Instructionsetarchitecture

X

X

Compilertechnology

X

X

X

Processorimplementation

X

X

Cacheandmemoryhierarchy

X

X

Source:

[HWAN93]

2.11MIPSrate=f/(CPI106)

2.12a.WecanexpresstheMIPsrateas:

[(MIPSrate)/106]=Ic/T.Sothat:

Ic=T[(MIPSrate)/106].TheratiooftheinstructioncountoftheRS/6000totheVAXis[x18]/[12x1]=1.5.

b.FortheVax,CPI=(5MHz)/(1MIPS)=5.

FortheRS/6000,CPI=25/18=1.39.

2.13CPI=1.55;MIPSrate=25.8;Executiontime=3.87ns.Source:

[HWAN93]

2.14a.Ultimately,theuserisconcernedwiththeexecutiontimeofasystem,notitsexecutionrate.IfwetakearithmeticmeanoftheMIPSratesofvariousbenchmarkprograms,wegetaresultthatisproportionaltothesumoftheinversesofexecutiontimes.Butthisisnotinverselyproportionaltothesumofexecutiontimes.Inotherwords,thearithmeticmeanoftheMIPSratedoesnotcleanlyrelatetoexecutiontime.Ontheotherhand,theharmonicmeanMIPSrateistheinverseoftheaverageexecutiontime.

b.

Arithmeticmean

HarmonicMean

Rank

ComputerA

25.3MIPS

0.25MIPS

2

ComputerB

2.8MIPS

0.21MIPS

3

ComputerC

3.25MIPS

2.1MIPS

1

hapter3

ComputerFunctionandInterconnection

AnswerstoQuestions

3.1Processor-memory:

Datamaybetransferredfromprocessortomemoryorfrommemorytoprocessor.Processor-I/O:

DatamaybetransferredtoorfromaperipheraldevicebytransferringbetweentheprocessorandanI/Omodule.Dataprocessing:

Theprocessormayperformsomearithmeticorlogicoperationondata.Control:

Aninstructionmayspecifythatthesequenceofexecutionbealtered.

3.2Instructionaddresscalculation(iac):

Determinetheaddressofthenextinstructiontobeexecuted.Instructionfetch(if):

Readinstructionfromitsmemorylocationintotheprocessor.Instructionoperationdecoding(iod):

Analyzeinstructiontodeterminetypeofoperationtobeperformedandoperand(s)tobeused.Operandaddresscalculation(oac):

IftheoperationinvolvesreferencetoanoperandinmemoryoravailableviaI/O,thendeterminetheaddressoftheoperand.Operandfetch(of):

FetchtheoperandfrommemoryorreaditinfromI/O.Dataoperation(do):

Performtheoperationindicatedintheinstruction.Operandsto

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 自然科学 > 物理

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2