Professional Documents
Culture Documents
Disclaimer
Thecontentsoftheslidesaresolelyforthepurposeofteachingstudents atSRMUniversity.AllcopyrightsandTrademarksof organizations/personsapplyevenifnotspecifiedexplicitly.
UNITIV:memoryorganization
Memoryhierarchy
MainMemory memoryunitthatcommunicatesdirectlywith theCPU Auxiliarymemory devicesthatprovidebackupstorage(e.g) magneticdisksandtapes Cachememory highspeedmemoryusedtoincreasethespeed ofprocessingbymakingprogramsanddataavailabletotheCPU atarapidrate
MAINmemory
StaticRandomAccessMemory internalflipflopsthatstorethe binaryinformation DynamicRAM storesthebinaryinformationintheformof electricchargesthatareappliedtocapacitors ReadOnlyMemory storeprogramsthatarepermanently residentinthecomputerandfortablesofconstantsthatdonot changeinvalueoncetheproductionofthecomputeris completed Bootstraploader functionisstartthecomputersoftware operatingwhenpoweristurnedon
Mainmemory
Bootstrapprogramloadsaportionofoperatingsystemfrom disctomainmemoryandcontrolisthentransferredtooperating system RAMchip utilizesbidirectionaldatabuswiththreestate bufferstoperformcommunicationwithCPU Memoryaddressmap pictorialrepresentationofassigned addressspaceforeachchipinthesystem
blockdiagramandfunctiontableofram
Auxiliarymemory
Accesstime averagetimerequiredtoreachastoragelocation inmemoryandobtainitscontent Seektime timerequiredtopositiontheread/writeheadtoa location Transfertime timerequiredtotransferdatatoorfromthe device Transferrate no.ofcharactersorwordsthatthedevicecan transferpersecond
Associativememory
AssociativememorycanalsobecalledasContentaddressable memory(CAM) CAMisaccessedsimultaneouslyandinparallelonthebasisof datacontentratherthanbyspecificaddressorlocation AssociativememoryismoreexpensivethanaRAMbecauseeach cellmusthavestoragecapabilityaswellaslogiccircuits Argumentregister holdsanexternalargumentforcontent matching Keyregister maskforchoosingaparticularfieldorkeyinthe argumentword
Blockdiagramofassociative memory
10
Onecellofassociativememory
11
Cachememory
Localityofreference referencestomemoryatanygiven intervaltendtobeconfinedwithinafewlocalizedareasof memory Cachememory logicallyplacedbetweenCPUandmain memory Hitratio ratioofthenumberofhits(successinfindingthe wordsinCache)tothetotalCPUreferencestomemory (hits+misses) Mapping transformationofdatafrommainmemorytocache memory
12
Cachememory
Threetypesofmappingprocedures
Associativemapping storesbothaddressand contentofthememoryword;Inthematching process,iftheaddressisfound,the corresponding12bitdataisreadandsenttothe CPU Directmapping consistsofindexfieldandtag field;no.ofbitsintheindexfieldisequaltothe numberofaddressbitsrequiredtoaccessthe cachememory;eachwordinthecacheconsists ofdatawordanditsassociatedtag;hit:tagfieldof CPUaddress=tagfieldinthecache
13
Cachememory
Threetypesofmappingprocedures
14
ASSOCIATIVEMAPPINGCACHE
15
Virtualmemory
Virtualmemory permittheusertoconstructprogramsasthoughlarge memoryspacewereavailable,equaltothetotalityoftheauxiliarymemory AnaddressusedbyaprogrammerisVirtualaddress Setofvirtualaddressesarecalledaddressspace Anaddressinmainmemoryiscalledalocationorphysicaladdress Setofphysicaladdressesconstitutememoryspace
16
Virtualmemory
Addressspace>memoryspaceifvirtualmemoryisavailable. Mappingavirtualaddress
17
Memorytableformappingavirtualaddress
18
Addressmappingusingpages
Blocks physicalmemoryisbrokendownintogroupsofequalsize Page groupsofaddressspaceofthesamesize Pageframeissometimesusedtodenoteablock Memorypagetableconsistsof8wordsoneforeachpage Addressinthepagetabledenotesthepagenumber Contentofthewordgivestheblocknumberwherethatpageisstored inmainmemory Presencebit indicateswhetherthepagehasbeentransferredfrom auxiliarymemoryintomainmemory 3highorderbitsofthevirtualaddressspecifyapagenumberandan addressforthememorypagetable.
19
Memorymanagementhardware
Basiccomponentsinclude: Facilityfordynamicstoragerelocationthatmapslogicalmemory referencesintophysicalmemoryaddresses Provisionforstoringcommonprogramsstoredinmemorybydifferent users Securityagainstunauthorizedaccessbetweenusersandpreventing usersfromchangingOSfunctions Segment setoflogicallyrelatedinstructionsordataelementsassociated withagivenname(addressgeneratedbyasegmentedprogramislogical address) Translationlookasidebuffer(TLB) fastassociativememoryusedtohold themostrecentlyreferencedtableentries
20
Exampleoflogicalandphysicaladdresses
21
Needforcache StaticanddynamicRAMComparison Memoryaddressmapping Contentaddressablememory function Localityofreference Mappingproceduresincachememory Addressspaceandmemoryspace Needformemorymanagementhardware Componentsofmemorymanagementhardwareunit
22