计算机组成与设计硬件软件接口课后习题答案.pdf
- 文档编号:3438490
- 上传时间:2023-05-05
- 格式:PDF
- 页数:22
- 大小:90.09KB
计算机组成与设计硬件软件接口课后习题答案.pdf
《计算机组成与设计硬件软件接口课后习题答案.pdf》由会员分享,可在线阅读,更多相关《计算机组成与设计硬件软件接口课后习题答案.pdf(22页珍藏版)》请在冰点文库上搜索。
PartII:
SolutionsGuide52InstructorsManualforComputerOrganizationandDesign1.1q1.2u1.3f1.4a1.5c1.6d1.7i1.8k1.9j1.10o1.11w1.12p1.13n1.14r1.15y1.16s1.17l1.18g1.19x1.20z1.21t1.22b1.23h1.24m1.25e1.26v1.27j1.28b1.29f1.30j1.31i1.32e1SolutionsPartII:
SolutionsGuide531.33d1.34g1.35c1.36g1.37d1.38c1.39j1.40b1.41f1.42h1.43a1.44a1.45TimeforTimefor1.46Asdiscussedinsection1.4,diecostsriseveryfastwithincreasingdiearea.Con-siderawaferwithalargenumberofdefects.Itisquitelikelythatifthedieareaisverysmall,somedieswillescapewithnodefects.Ontheotherhand,ifthedieareaisverylarge,itmightbelikelythateverydiehasoneormoredefects.Ingeneral,then,dieareagreatlyaffectsyield(astheequationsonpage48indicate),andsowewouldexpectthatdiesfromwaferBwouldcostmuchmorethandiesfromwaferA.1.47ThedieareaofthePentiumprocessorinFigure1.16is91mm2anditcontainsabout3.3milliontransistors,orroughly36,000persquaremillimeter.Ifweassumetheperiodhasanareaofroughly.1mm2,itwouldcontain3500transistors(thisiscertainlyaveryroughestimate).SimilarcalculationswithregardtoFigure1.26andtheIntel4004resultin191transistorspersquaremillimeterorroughly19transistors.1.48WecanwriteDiesperwafer=f(Diearea)1)andYield=f(Diearea)2)andthusCostperdie=f(Diearea)3).Moreformally,wecanwrite:
1.49Nosolutionprovided.1.50FromthecaptioninFigure1.16wehave198diesat100%yield.Ifthedefectdensityis1persquarecentimeter,thentheyieldisapproximatedby1/(1+1.91/2)2)=.47.Thus198.47=93dieswithacostof$1000/93=$10.75perdie.1.51Defectsperarea.12-revolution12-=rev15400-minutesrev-60ondssecminute-5.56ms=12-revolution12-=rev17200-minutesrev-60ondssecminute-4.17ms=CostperdieCostperwaferDiesperwaferyield-=DiesperwaferWaferareaDiearea-=Yield11DefectperareaDiearea2+()2-=54InstructorsManualforComputerOrganizationandDesign1.521.531.54Nosolutionprovided.1.55Nosolutionprovided.1.56Nosolutionprovided.1980Diearea0.16Yield0.48Defectdensity17.041992Diearea0.97Yield0.48Defectdensity1.981992+1980Improvement8.62Yield11DefectsperareaDiearea2+()2-=PartII:
SolutionsGuide552.1Forprogram1,M2is2.0(10/5)timesasfastasM1.Forprogram2,M1is1.33(4/3)timesasfastasM2.2.2Sinceweknowthenumberofinstructionsexecutedandthetimeittooktoexecutetheinstructions,wecaneasilycalculatethenumberofinstructionspersecondwhilerunningprogram1as(200106)/10=20106forM1and(160106)/5=32106forM2.2.3WeknowthatCyclesperinstruction=Cyclespersecond/Instructionspersec-ond.ForM1wethushaveaCPIof200106cyclespersecond/20106instructionspersecond=10cyclesperinstruction.ForM2wehave300/32=9.4cyclesperinstruc-tion.2.4Wearegiventhenumberofcyclespersecondandthenumberofseconds,sowecancalculatethenumberofrequiredcyclesforeachmachine.IfwedividethisbytheCPIwellgetthenumberofinstructions.ForM1,wehave3seconds200106cy-cles/second=600106cyclesperprogram/10cyclesperinstruction=60106in-structionsperprogram.ForM2,wehave4seconds300106cycles/second=1200106cyclesperprogram/9.4cyclesperinstruction=127.7106instructionsperpro-gram.2.5M2istwiceasfastasM1,butitdoesnotcosttwiceasmuch.M2isclearlythema-chinetopurchase.2.6Ifwemultiplythecostbytheexecutiontime,wearemultiplyingtwoquantities,foreachofwhichsmallernumbersarepreferred.Forthisreason,costtimesexecutiontimeisagoodmetric,andwewouldchoosethemachinewithasmallervalue.Intheexample,weget$10,00010seconds=100,000forM1vs.$15,0005seconds=75,000forM2,andthusM2isthebetterchoice.Ifweusedcostdividedbyexecutiontimeandassumewechoosethemachinewiththelargervalue,thenamachinewitharidiculous-lyhighcostwouldbechosen.Thismakesnosense.Ifwechoosethemachinewiththesmallervalue,thenamachinewitharidiculouslyhighexecutiontimewouldbecho-sen.Thistoomakesnosense.2.7Wewoulddefinecost-effectivenessasperformancedividedbycost.Thisisessen-tially(1/Executiontime)(1/Cost),andinbothcaseslargernumbersaremorecost-effectivewhenwemultiply.2.8WecanusethemethodinExercise2.7,buttheexecutiontimeisthesumofthetwoexecutiontimes.SoM1isslightlymorecost-effective,specifically1.04timesmore.2SolutionsExecutionspersecondperdollarforM111310,000-1130,000-=ExecutionspersecondperdollarforM21915,000-1135,000-=56InstructorsManualforComputerOrganizationandDesign2.9Wedothisproblembyfindingtheamountoftimethatprogram2canberuninanhourandusingthatforexecutionspersecond,thethroughputmeasure.Withperformancemeasuredbythroughputforprogram2,machineM2is=1.2timesfasterthanM1.Thecost-effectivenessofthemachinesistobemeasuredinunitsofthroughputonprogram2perdollar,soCost-effectivenessofM1=0.053Cost-effectivenessofM2=0.043Thus,M1ismorecost-effectivethanM2.(MachinecostsarefromExercise2.5.)2.10ForM1thepeakperformancewillbeachievedwithasequenceoninstructionsofclassA,whichhaveaCPIof1.Thepeakperformanceisthus500MIPS.ForM2,amixtureofAandBinstructions,bothofwhichhaveaCPIof2,willachievethepeakperformance,whichis375MIPS.2.11LetsfindtheCPIforeachmachinefirst.,and.Using,wegetthefollowing:
and.M2hasasmallerexecutiontimeandisthusfasterbytheinverseratiooftheexecutiontimeor250/200=1.25.2.12M1wouldbeasfastiftheclockratewere1.25higher,so5001.25=625MHz.2.13Note:
ThereisanerrorinExercise2.13onpage92inthetext.Thetableentryforrowc,column3(“CPIonM2”)shouldbe3insteadof8.Thiswillbecorrectedinthefirstreprintofthebook.Withthecorrectedvalueof3,thissolutionisvalid.UsingC1,theCPIonM1=5.8andtheCPIonM2=3.2.BecauseM1hasaclockratetwiceasfastasthatofM2,M1is1.10timesasfast.UsingC2,theCPIonM1=6.4andtheCPIonM2=2.9.M2isExecutionsofP2perhour3600secondshour-200secondsExecutionofP1-secondsExecutionofP2-=ExecutionsofP2perhouronM13600secondshour-200103-16003-533=ExecutionsofP2perhouronM23600secondshour-20054-26004-650=650533-53310,000-65015,000-CPIforM11234+4-2.5=CPIforM22244+4-3.0=CPUtimeInstructioncountCPIClockrate-=CPUtimeforM1Instructioncount2.5500MHz-Instructioncount200million-=CPUtimeforM2Instructioncount3750MHz-Instructioncount250million-=PartII:
SolutionsGuide57(6.4/2)/2.9=1.10timesasfast.Usingathird-partyproduct,CPIonM1=5.4andonM2=2.8.Thethird-partycompileristhesuperiorproductregardlessofmachinepur-chase.M1isthemachinetopurchaseusingthethird-partycompiler,asitwillbe1.04timesfasterfortypicalprograms.2.14LetI=numberofinstructionsinprogramandC=numberofcyclesinprogram.Thesixsubsetsareclockrate,Ccycletime,CMIPS,ICPI,C,MIPSCPI,I,clockrateCPI,I,cycletime.NotethatineverycaseeachsubsethastohaveatleastonerateCPI,clockrate,cycletime,MIPSandoneabsoluteC,I.2.15.LetsfindtheCPIforMFPfirst:
;ofcourse,theCPIforMNFPissimply2.Soand.2.162.17.Soexecutiontimeis=1.08seconds,andexecu-tiontimeonMNFPis=5.52seconds.2.18CPIforMbase=20.4+30.25+30.25+50.1=2.8CPIforMopt=20.4+20.25+30.25+40.1=2.452.19MIPSforMbase=500/2.8=179.MIPSforMopt=600/2.45=245.2.20Sinceitsthesamearchitecture,wecancomparethenativeMIPSratings.Moptisfasterbytheratio245/179=1.4.2.21Thisproblemcanbedoneinoneoftwoways.Eitherfindthenewmixandadjustthefrequenciesfirstorfindthenew(relative)instructioncountanddividetheCPIbythat.Weusethelatter.SowecancalculateCPIas2.22HowmustfasterisMcompthanMbase?
InstructionclassFrequencyonMFPCountonMFPinmillionsCountonMNFPinmillionsFloatingpointmultiply10%30900Floatingpointadd15%45900Floatingpointdivide5%15750Integerinstructions70%210210Totals100%3002760MIPSClockrateCPI106-=CPIforMFP0.160.1540.05200.72+3.6=MIPSforMFP1000CPI-278=MIPSforMNFP1000CPI-500=ExecutiontimeIC106MIPS-=300278-2760500-Ratioofinstructions0.90.40.90.250.850.250.10.95+0.81=CPI20.40.930.250.930.250.8550.10.95+0.81-3.1=CPUtimeMbaseClockrateICCPI-ClockrateIC2.8-=CPUtimeMcompClockrateIC0.813.1-ClockrateIC2.5-=58InstructorsManualforComputerOrganizationandDesignSothen2.23TheCPIisdifferentfromeitherMbaseorMcomp;findthatfirst:
2.24First,computetheperformancegrowthafter6and8months.After6months=1.0346=1.22.After8months=1.0348=1.31.ThebestchoicewouldbetoimplementeitherMbothorMopt.2.25Nosolutionprovided.2.26TotalexecutiontimeofcomputerAis1001seconds;computerB,110seconds;computerC,40seconds.ComputerCisfastest.Its25timesfasterthancomputerAand2.75timesfasterthancomputerB.2.27WecanjusttaketheGMoftheexecutiontimesandusetheinverse.,and,soCisfastest.2.28A,B:
BhasthesameperformanceasA.Ifwerunprogram2once,howmanytimesshouldwerunprogram1:
orx=100.Sothemixis99%program1,1%program2.B,C:
Cisfasterbytheratioof.Program2isrunonce,sowehave,x=3.1times.Sothemixis76%program1and24%pro-gram2.A,C:
Cisalsofasterby1.6here.Weusethesameequation,butwiththepropertimes:
x+1000=1.6(20x+20),x=31.2.Sothemixis97%program1and3%program2.Notethatthemixisverydifferentineachcase!
2.29SoBisfastest;itis1.10timesfasterthanCand5.0timesfasterthanA.Foranequalnumberofexecutionsoftheprograms,theratiooftotalexecutiontimesA:
B:
Cis1001:
110:
40,thusCis2.75timesfasterthanBand25timesfasterthanA.ProgramWeightComputerAComputerBComputerCProgram1(seconds)1011020Program2(se
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 计算机 组成 设计 硬件 软件 接口 课后 习题 答案