欢迎来到天天文库
浏览记录
ID:39742482
大小:562.09 KB
页数:13页
时间:2019-07-10
《CHAPTER 4 The Components of the System 4. Memory 课件》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、CHAPTER4TheComponentsoftheSystemUnitMemoryMainMemoryMainmemory–acollectionofstoragelocations,eachwithauniqueidentifiercalledtheaddress.Word-Dataaretransferredtoandfrommemoryingroupsofbitscalledwords.ThenumberofbitsthatcanbestoredinoneCPUregisterinacomputer.Figure5-3MainmemoryAddressSpaceAl
2、thoughprogrammersuseanametoidentifyaword,atthehardwarelevel,eachwordisidentifiedbyanaddress.Addressspace-Thetotalnumberofuniquelyidentifiablelocationsinmemory.Forexample:amemorywith64KBandawordsizeof1bytehasanaddressspacethatrangefrom0to65535.Table5.1MemoryunitsUnit------------KB-kilobyte
3、MB-megabyteGB-gigabyteTB-terabytePB-petabyteEB-exabyteExactNumberofbytes------------------------210bytes220bytes230bytes240bytes250bytes260bytesApproximation------------103bytes106bytes109bytes1012bytes1015bytes1018bytesAddressasBitPatternBecausecomputersoperatebystoringnumbersasbitpattern
4、s,theaddressitselfisalsorepresentedasabitpattern.IfacomputerhasNwordsofmemory,youneedanunsignedintegerofsizelog2Nbitstorefertoeachmemorylocation.Memoryaddressesaredefinedusingunsignedbinaryintegers.Note:Example1Acomputerhas32MB(megabytes)ofmemory.Howmanybitsareneededtoaddressanysinglebytei
5、nmemory?SolutionThememoryaddressspaceis32MB,or225(25x220).Thismeansyouneedlog2225or25bits,toaddresseachbyte.Example2Acomputerhas128MBofmemory.Eachwordinthiscomputeris8bytes.Howmanybitsareneededtoaddressanysinglewordinmemory?SolutionThememoryaddressspaceis128MB,whichmeans227.However,eachwor
6、dis8(23)bytes,whichmeansthatyouhave224words.Thismeansyouneedlog2224or24bits,toaddresseachword.MemoryTypesRAM(RandomAccessMemory)VolatileR/WbyuserTwocategories:DRAM(DynamicRAM)RefreshusedinmostPCsSRAM(StaticRAM)Norefreshfaster、morereliablemoreexpensiveoftenusedonlyasamemorycacheMemoryTypesR
7、OM(ReadOnlyMemory)NonvolatileWrittenbymanufactureHoldthebootingprogramCategories:ROMPROM(ProgrammableROM)-WriteoncebyuserEPROM(ErasablePROM)-physicalremovalandreinstallationbyspecialdeviceEEPROM(ElectronicallyEPROM)-withoutbeingremovedfromcomputerFigure5-4Memo
此文档下载收益归作者所有