Memory l.jpg
This presentation is the property of its rightful owner.
Sponsored Links
1 / 24

Memory PowerPoint PPT Presentation


  • 86 Views
  • Uploaded on
  • Presentation posted in: General

Memory. Computer Architecture CS 215. Increasing performance & cost. Memory Hierarchy. Registers Cache Main memory Secondary storage Off-line storage. Random Access Memory. SRAM (Static RAM) Based on flip-flops Content persists as long as current is present DRAM (Dynamic RAM)

Download Presentation

Memory

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Memory l.jpg

Memory

Computer ArchitectureCS 215


Memory hierarchy l.jpg

Increasing performance & cost

Memory Hierarchy

Registers

Cache

Main memory

Secondary storage

Off-line storage


Random access memory l.jpg

Random Access Memory

  • SRAM (Static RAM)

    • Based on flip-flops

    • Content persists as long as current is present

  • DRAM (Dynamic RAM)

    • Employs a capacitor

    • Stores minute charge for each bit

    • Charge dissipates requiring periodic refresh

    • Susceptible to premature discharging


Chip organization l.jpg

Chip Organization


New ram from old l.jpg

New RAM from Old

  • Two 4-word by 4-bit RAMs make up an 8-Word by 4-Bit RAM


Commercial memory modules l.jpg

CommercialMemory Modules

  • Address InputsA0-A9

  • Column-Address StrobeCAS

  • Data In/Data OutDQ1-DQ8

  • No ConnectionNC

  • Row-Address StrobeRAS

  • 5-V SupplyVcc

  • GroundVss

  • Write EnableW


Read only memory l.jpg

Read-Only Memory

  • Note how each decoder output is connected to specific OR gates

  • What is value of Q when A is 10?


Cache memory l.jpg

Cache Memory

  • Associative Mapped

  • Direct Mapped

  • Set Associative Mapped

  • Performance

  • Hit Ratios

  • Effective Access Times

  • Multilevel

  • Management


Associative mapped l.jpg

AssociativeMapped

  • Assume …

    • 232 word memory

    • 227 blocks of 25 = 32 words per block

    • Cache consists of 214 slots

  • If the addressed word is in the cache, it will be found in a slot that has tag made up of the 27 most significant bits of the address

  • If the addressed word is not in the cache, then the block brought into an available slot in the cache from the main memory, and the memory reference is then satisfied from the cache.


Associative mapped10 l.jpg

AssociativeMapped

  • Replacement policy(Associative and set-associative mapping schemes, and also for virtual memory)

    • Least recently used (LRU)

    • First-in/first-out (FIFO)

    • Least frequently used (LFU)

    • Random

    • Optimal (used for analysis only – look backward in time and re-verse engineer the best possible strategy for a particular sequence of memory references.)


Direct mapped l.jpg

DirectMapped

  • Each Block can be mapped to only one slot, but …

  • Each slot can be maped to more than one block


Example l.jpg

Example

Cache

Main

Slot 0

Block 0

3

0-255

-

Slot 1

Block 1

256-511

-

Block 2

512-767

Slot 2

Block 3

768-1023

  • Access M(776)

  • Choose Slot 0

  • Copy Block 3 into Slot 0

Block 4

1024-1279

Block 5

1280-1535

Block 6

1536-1791

Block 7

1792-2047


Example13 l.jpg

Example

Cache

Main

Slot 0

Block 0

3

0-255

5

Slot 1

Block 1

256-511

-

Block 2

512-767

Slot 2

Block 3

768-1023

  • Access M(1296)

  • Choose Slot 1

  • Copy Block 5 into Slot 1

Block 4

1024-1279

Block 5

1280-1535

Block 6

1536-1791

Block 7

1792-2047


Example14 l.jpg

Example

Cache

Main

Slot 0

Block 0

3

0-255

5

Slot 1

Block 1

256-511

0

Block 2

512-767

Slot 2

Block 3

768-1023

  • Access M(64)

  • Choose Slot 2

  • Copy Block 0 into Slot 2

Block 4

1024-1279

Block 5

1280-1535

Block 6

1536-1791

Block 7

1792-2047


Example15 l.jpg

Example

Cache

Main

Slot 0

Block 0

3

0-255

5

Slot 1

Block 1

256-511

0

Block 2

512-767

Slot 2

?

Block 3

768-1023

  • Access M(1536)

  • Which slot should be used?

Block 4

1024-1279

Block 5

1280-1535

Block 6

1536-1791

Block 7

1792-2047


Hit ratios l.jpg

Hit Ratios

  • Hit -Referenced word is in cache memory(Block previously loaded)

  • Miss -Referenced word is not in cache(Block needs to be loaded)


Effective access times l.jpg

Effective Access Times


Multilevel l.jpg

Multilevel


Virtual memory l.jpg

Virtual Memory

  • Overlays

  • Paging

  • Fragmentation

  • Virtual vs. Cache


Overlays l.jpg

Overlays


Overlays21 l.jpg

Overlays

Main Routine

Subroutine A


Overlays22 l.jpg

Overlays

Main Routine

Subroutine B

Subroutine C


Virtual memory23 l.jpg

Virtual Memory

  • Virtual memory is stored in a hard disk image

  • The physical memory holds a small number of virtual pages in physical page frames


Paging l.jpg

Paging

  • Page table maps between virtual memory and physical memory

  • Column 1 – Is page occupied?

  • Column 2 – Hard disk starting address

  • Column 3 – Physical address prefix


  • Login