《计算机组成原理课件英文版第一章》由会员分享,可在线阅读,更多相关《计算机组成原理课件英文版第一章(63页珍藏版)》请在金锄头文库上搜索。
1、Chapter 1Computer Abstractions and TechnologyChapter 1 Computer Abstractions and Technology 2The Computer RevolutionnProgressincomputertechnologynUnderpinnedbyMooresLawnWhatisMooresLaw?nMooreslawdescribesalong-termtrendinthehistoryofcomputinghardware.nThequantityoftransistorsthatcanbeplacedinexpensi
2、velyonanintegratedcircuithasdoubledapproximatelyeverytwoyears.1.1IntroductionMoores LawChapter 1 Computer Abstractions and Technology 3The trend has continued formorethanhalfacenturyandisnotexpectedtostopuntil2015orlater.Chapter 1 Computer Abstractions and Technology 4The Computer RevolutionnMakesno
3、velapplicationsfeasiblenComputersinautomobiles1.1IntroductionChapter 1 Computer Abstractions and Technology 5The Computer RevolutionnMakesnovelapplicationsfeasiblenCellphones1.1IntroductionChapter 1 Computer Abstractions and Technology 6The Computer RevolutionnMakesnovelapplicationsfeasiblenHumangen
4、omeprojectnWorldWideWebnSearchEngines1.1IntroductionChapter 1 Computer Abstractions and Technology 7The Computer RevolutionnComputersarepervasive1.1IntroductionChapter 1 Computer Abstractions and Technology 8Classes of ComputersnQuestion:Howdoyouclassifycomputers?nDesktopComputersnServerComputersnEm
5、beddedComputersChapter 1 Computer Abstractions and Technology 9Classes of ComputersnDesktopcomputersPCnGeneralpurpose,varietyofsoftwarenSubjecttocost/performancetradeoffChapter 1 Computer Abstractions and Technology 10Classes of ComputersnServercomputersnNetworkbasednHighcapacity,performance,reliabi
6、litynRangefromsmallserverstobuildingsizedWorldssmallestwebserverChapter 1 Computer Abstractions and Technology 11Classes of ComputersnEmbeddedcomputersnHiddenascomponentsofsystemsnStringentpower/performance/costconstraintsChapter 1 Computer Abstractions and Technology 12The Processor MarketChapter 1
7、 Computer Abstractions and Technology 13What You Will LearnnHowprogramsaretranslatedintothemachinelanguagenAndhowthehardwareexecutesthemnThehardware/softwareinterfacenWhatdeterminesprogramperformancenAndhowitcanbeimprovednHowhardwaredesignersimproveperformancenWhatisparallelprocessingChapter 1 Compu
8、ter Abstractions and Technology 14Levels of Program CodenHigh-levellanguagenLevelofabstractionclosertoproblemdomainnProvidesforproductivityandportabilitynAssemblylanguagenTextualrepresentationofinstructionsnHardwarerepresentationnBinarydigits(bits)nEncodedinstructionsanddataChapter 1 Computer Abstra
9、ctions and Technology 15Below Your ProgramnApplicationsoftwarenWritteninhigh-levellanguage(HLL)nSystemsoftwarenCompiler:translatesHLLcodetomachinecodenOperatingSystem:servicecodenHandlinginput/outputnManagingmemoryandstoragenSchedulingtasks&sharingresourcesnHardwarenProcessor,memory,I/Ocontrollers1.
10、2BelowYourProgramChapter 1 Computer Abstractions and Technology 16Understanding PerformancenAlgorithmnDeterminesnumberofoperationsexecutednProgramminglanguage,compiler,architecturenDeterminenumberofmachineinstructionsexecutedperoperationnProcessorandmemorysystemnDeterminehowfastinstructionsareexecut
11、ednI/Osystem(includingOS)nDetermineshowfastI/OoperationsareexecutedChapter 1 Computer Abstractions and Technology 17Components of a ComputernSamecomponentsforallkindsofcomputernDesktop,server,embeddednInput/outputincludesnUser-interfacedevicesnDisplay,keyboard,mousenStoragedevicesnHarddisk,CD/DVD,fl
12、ashnNetworkadaptersnForcommunicatingwithothercomputers1.3UndertheCoversThe BIG PictureChapter 1 Computer Abstractions and Technology 18Anatomy (结构结构) of a ComputerOutputdeviceInputdeviceInputdeviceNetworkcableChapter 1 Computer Abstractions and Technology 19Anatomy of a MousenOpticalmousenLEDillumin
13、atesdesktopnSmalllow-rescameranBasicimageprocessornLooksforx,ymovementnButtons&wheelnSupersedesroller-ballmechanicalmouseChapter 1 Computer Abstractions and Technology 20Through the Looking GlassnLCDscreen:pictureelements(pixels)nMirrorscontentofframebuffermemoryChapter 1 Computer Abstractions and T
14、echnology 21Opening the BoxChapter 1 Computer Abstractions and Technology 22Inside the Processor (CPU)nDatapath:performsoperationsondatanControl:sequencesdatapath,memory,.nCachememorynSmallfastSRAMmemoryforimmediateaccesstodataSRAMStaticRandomAccessMemoryChapter 1 Computer Abstractions and Technolog
15、y 23Inside the ProcessornAMDBarcelona:4processorcoresChapter 1 Computer Abstractions and Technology 24A Safe Place for DatanVolatile(易变的)mainmemorynLosesinstructionsanddatawhenpoweroffnNon-volatilesecondarymemorynMagneticdisknFlashmemorynOpticaldisk(CDROM,DVD)Chapter 1 Computer Abstractions and Tech
16、nology 25NetworksnCommunicationandresourcesharingnLocalareanetwork(LAN):EthernetnWithinabuildingnWideareanetwork(WAN):theInternetChapter 1 Computer Abstractions and Technology 26AbstractionsnInstructionSetArchitecture(ISA)nAninterfacebetweenthehardwareandthelowest-levelsoftwarenTheabstractimageofaco
17、mputingsystemthatisseenbyamachine/assemblylanguageprogrammernIncludinginstructions,registers,memoryaccess,I/O,The BIG PictureISAsnSystem/360andupwardscompatiblesuccessorsnz/ArchitecturenPowerArchitecturenPDP-11nSPARCnSuperHnTricorenTransputernUNIVAC1100/2200seriesnVAXnx86nIA-32(32-bitx86,firstimplem
18、entedintheIntel80386)nx86-64(64-bitsupersetofIA-32,firstimplementedintheAMDOpteron)nEISC(AE32K)Chapter 1 Computer Abstractions and Technology 27n4004,4040n6800,6502,6809,68HC11,68HC08.n8008,8080,8085,Z80,Z180,eZ80,etc.n8048,8051,etc.nZ8,eZ8,etc.nAlphanARMnBurroughsB5000seriesnBurroughsB6000/B7000ser
19、iesneSi-RISCnIA-64(Itanium)nMico32nMIPSnMotorola68knPA-RISCnIBM700/7000linesChapter 1 Computer Abstractions and Technology 28AbstractionsnApplicationBinaryInterface(ABI)nthelow-levelinterfacebetweenanapplicationprogramandOSnABIscoverdetailssuchasdatatype,size,alignment,callingconvention,binaryformat
20、ofobjectfiles,etc.nDefinesastandardforbinaryportabilityacrosscomputers.Chapter 1 Computer Abstractions and Technology 29AbstractionsnImplementationnHardwarethatobeysthearchitectureabstractionnManyimplementationsforthesameISAnExample:IntelPentiumvsAMDAthlon,nalmostidenticalISA,butradicallydifferentin
21、ternaldesigns.PERFORMANCEChapter 1 Computer Abstractions and Technology 30Chapter 1 Computer Abstractions and Technology 31Defining PerformancenWhichairplanehasthebestperformance?1.4PerformanceChapter 1 Computer Abstractions and Technology 32Defining PerformancenWhichairplanehasthebestperformance?1.
22、4PerformanceDefining PerformancenPerformance=SpeednE.g.,takingasinglepassengerfromonepointtoanothernWinner:ConcordenPerformance=PassengerThroughputnPassengersxm.p.hnE.g.,transporting450passengersfromonepointtoanothernWinner:Boeing747Chapter 1 Computer Abstractions and Technology 33Chapter 1 Computer
23、 Abstractions and Technology 34Response Time and ThroughputnResponsetimenHowlongittakestodoatasknThroughputnTotalworkdoneperunittimene.g.,tasks/transactions/perhourChapter 1 Computer Abstractions and Technology 35Response Time and ThroughputnHowareresponsetimeandthroughputaffectedbynReplacingtheproc
24、essorwithafasterversion?nAddingmoreprocessors?nWellfocusonresponsetimefornowChapter 1 Computer Abstractions and Technology 36Relative PerformancenDefinePerformance=1/ExecutionTimen“XisntimefasterthanY”nExample:timetakentorunaprogramn10sonA,15sonBnExecutionTimeB/ExecutionTimeA=15s/10s=1.5nSoAis1.5tim
25、esfasterthanBChapter 1 Computer Abstractions and Technology 37Measuring Execution TimenElapsedtimenTotalresponsetime,includingallaspectsnProcessing,I/O,OSoverhead,idletimenDeterminessystemperformancenCPUtimenTimespentprocessingagivenjobnDiscountsI/Otime,otherjobssharesnComprisesuserCPUtimeandsystemC
26、PUtimenDifferentprogramsareaffecteddifferentlybyCPUandsystemperformanceChapter 1 Computer Abstractions and Technology 38CPU ClockingnOperationofdigitalhardwaregovernedbyaconstant-rateclockClock(cycles)DatatransferandcomputationUpdatestateClockperiodnClockcycletime:durationofaclockcyclene.g.,250ps=0.
27、25ns=2501012snClockfrequency(clockrate):cyclespersecondne.g.,4.0GHz=4000MHz=4.0109HzChapter 1 Computer Abstractions and Technology 39CPU TimenPerformanceimprovedbynReducingnumberofclockcyclesnIncreasingclockratenHardwaredesignermustoftentradeoffclockrateagainstcyclecountChapter 1 Computer Abstractio
28、ns and Technology 40CPU Time ExamplenComputerA:2GHzclock,10sCPUtimenDesigningComputerBnAimfor6sCPUtimenCandofasterclock,butcauses1.2clockcyclesnHowfastmustComputerBsclockratebe?Chapter 1 Computer Abstractions and Technology 41Instruction Count and CPInInstructionCountforaprogramnDeterminedbyprogram,
29、ISAandcompilernAveragecyclesperinstructionnDeterminedbyCPUhardwarenIfdifferentinstructionshavedifferentCPInAverageCPIaffectedbyinstructionmixCPIChapter 1 Computer Abstractions and Technology 42CPI ExamplenComputerA:CycleTime=250ps,CPI=2.0nComputerB:CycleTime=500ps,CPI=1.2nSameISAnWhichisfaster,andby
30、howmuch?AisfasterbythismuchChapter 1 Computer Abstractions and Technology 43CPI in More DetailnIfdifferentinstructionclassestakedifferentnumbersofcyclesnWeightedaverageCPIRelativefrequencyChapter 1 Computer Abstractions and Technology 44CPI ExamplenAlternativecompiledcodesequencesusinginstructionsin
31、classesA,B,CClassABCCPIforclass123ICinsequence1212ICinsequence2411nSequence1:IC=5nClockCycles=21+12+23=10nAvg.CPI=10/5=2.0nSequence2:IC=6nClockCycles=41+12+13=9nAvg.CPI=9/6=1.5Whatisavg.CPI?IC=InstructionCountChapter 1 Computer Abstractions and Technology 45Performance SummarynPerformancedependsonnA
32、lgorithm:affectsIC,possiblyCPInProgramminglanguage:affectsIC,CPInCompiler:affectsIC,CPInInstructionsetarchitecture:affectsIC,CPI,TcThe BIG PicturePOWERChapter 1 Computer Abstractions and Technology 46Chapter 1 Computer Abstractions and Technology 47Power TrendsnInCMOSICtechnology1.5ThePowerWall10003
33、05V1VChapter 1 Computer Abstractions and Technology 48Reducing PowernSupposeanewCPUhasn85%ofcapacitiveloadofoldCPUn15%voltageand15%frequencyreductionnThepowerwallnWecantreducevoltagefurthernWecantremovemoreheatnHowelsecanweimproveperformance?Chapter 1 Computer Abstractions and Technology 49Uniproces
34、sor Performance1.6TheSeaChange:TheSwitchtoMultiprocessorsConstrainedbypower,instruction-levelparallelism,memorylatencyChapter 1 Computer Abstractions and Technology 50MultiprocessorsnMulticoremicroprocessorsnMorethanoneprocessorperchipnRequiresexplicitlyparallelprogrammingnComparewithinstructionleve
35、lparallelismnHardwareexecutesmultipleinstructionsatoncenHiddenfromtheprogrammernHardtodonProgrammingforperformancenLoadbalancingnOptimizingcommunicationandsynchronizationMANUFACTURINGChapter 1 Computer Abstractions and Technology 51Chapter 1 Computer Abstractions and Technology 52Manufacturing ICsnY
36、ield:proportionofworkingdiesperwafer1.7RealStuff:TheAMDOpteronX4Chapter 1 Computer Abstractions and Technology 53AMD Opteron X2 WafernX2:300mmwafer,117chips,90nmtechnologynX4:45nmtechnologyChapter 1 Computer Abstractions and Technology 54Integrated Circuit CostnNonlinearrelationtoareaanddefectratenW
37、afercostandareaarefixednDefectratedeterminedbymanufacturingprocessnDieareadeterminedbyarchitectureandcircuitdesignBENCHMARKINGChapter 1 Computer Abstractions and Technology 55Chapter 1 Computer Abstractions and Technology 56SPEC CPU BenchmarknProgramsusedtomeasureperformancenSupposedlytypicalofactua
38、lworkloadnStandardPerformanceEvaluationCorp(SPEC)nDevelopsbenchmarksforCPU,I/O,Web,nSPECCPU2006nElapsedtimetoexecuteaselectionofprogramsnNegligibleI/O,sofocusesonCPUperformancenNormalizerelativetoreferencemachinenSummarizeasgeometricmeanofperformanceratiosnCINT2006(integer)andCFP2006(floating-point)
39、Chapter 1 Computer Abstractions and Technology 57CINT2006 for Opteron X4 2356NameDescriptionIC109CPITc(ns)ExectimeReftimeSPECratioperlInterpretedstringprocessing2,1180.750.406379,77715.3bzip2Block-sortingcompression2,3890.850.408179,65011.8gccGNUCCompiler1,0501.720.47248,05011.1mcfCombinatorialoptim
40、ization33610.000.401,3459,1206.8goGogame(AI)1,6581.090.4072110,49014.6hmmerSearchgenesequence2,7830.800.408909,33010.5sjengChessgame(AI)2,1760.960.483712,10014.5libquantumQuantumcomputersimulation1,6231.610.401,04720,72019.8h264avcVideocompression3,1020.800.4099322,13022.3omnetppDiscreteeventsimulat
41、ion5872.940.406906,2509.1astarGames/pathfinding1,0821.790.407737,0209.1xalancbmkXMLparsing1,0582.700.401,1436,9006.0Geometricmean11.7Chapter 1 Computer Abstractions and Technology 58SPEC Power BenchmarknPowerconsumptionofserveratdifferentworkloadlevelsnPerformance:ssj_ops/secnPower:Watts(Joules/sec)
42、Chapter 1 Computer Abstractions and Technology 59SPEC power_ssj2008 for X4TargetLoad%Performance(ssj_ops/sec)AveragePower(Watts)100%231,86729590%211,28228680%185,80327570%163,42726560%140,16025650%118,32424640%920,3523330%70,50022220%47,12620610%23,0661800%0141Overallsum1,283,5902,605ssj_ops/power49
43、3Chapter 1 Computer Abstractions and Technology 60Pitfall: Amdahls LawnImprovinganaspectofacomputerandexpectingaproportionalimprovementinoverallperformance1.8FallaciesandPitfallsnCantbedone!nExample:multiplyaccountsfor80s/100snHowmuchimprovementinmultiplyperformancetoget5overall?Chapter 1 Computer A
44、bstractions and Technology 61Fallacy: Low Power at IdlenLookbackatX4powerbenchmarknAt100%load:295WnAt50%load:246W(83%)nAt10%load:180W(61%)nGoogledatacenternMostlyoperatesat10%50%loadnAt100%loadlessthan1%ofthetimenConsiderdesigningprocessorstomakepowerproportionaltoloadChapter 1 Computer Abstractions
45、 and Technology 62Pitfall: MIPS as a Performance MetricnMIPS:MillionsofInstructionsPerSecondnDoesntaccountfornDifferencesinISAsbetweencomputersnDifferencesincomplexitybetweeninstructionsnCPIvariesbetweenprogramsonagivenCPUChapter 1 Computer Abstractions and Technology 63Concluding RemarksnCost/performanceisimprovingnDuetounderlyingtechnologydevelopmentnHierarchicallayersofabstractionnInbothhardwareandsoftwarenInstructionsetarchitecturenThehardware/softwareinterfacenExecutiontime:thebestperformancemeasurenPowerisalimitingfactornUseparallelismtoimproveperformance1.9ConcludingRemarks