Professional Documents
Culture Documents
Advanced VLSI Architecture: Lecture 7: Memory Hierarchy
Advanced VLSI Architecture: Lecture 7: Memory Hierarchy
Advanced VLSI Architecture: Lecture 7: Memory Hierarchy
Virtual Memory
Two major Motivations
Main Secondary
Cache
Memory Memory
Virtual Memory
Main Secondary
P Cache
Memory Memory
Multiple
Programs loaded
CKV
Virtual Memory
How to protect the programs from each other ?
Virtual Memory
Second motivation allow user program to exceed the size
of primary memory
Virtual Memory
Concepts of virtual memory and Cache are similar
A virtual memory block is called Page
Cache VM
P C M P M S
Virtual Memory
Page hit
Page Miss
Physical Address
Translate
CKV
Virtual Memory
Virtual Address Physical Address
Page
Page Absent
CKV
Virtual Memory
Virtual memory simplifies loading of a program by
providing relocation
Virtual Memory
In virtual memory the address is broken into A virtual
page number and a page offset
Translation
Virtual Memory
C Page
A
Processor
B
A
B
C
D
Address
Translation
Main Memory
Secondary memory
Page Fault
Page A
B
Program’s Address space
C
Virtual Address space Millions of cycles
D
CKV
Virtual Memory
Design Issues
Page size should be large enough (4KB-16KB)
Page Tables
Pages are located by using a table that indexes the
memory
Each program has its own page table, which maps the
virtual address to physical address
Page Tables
Page table Register
Valid
Main Memory
Page A 0
B 1
C 2
D 3 Virtual Address space
CKV
Main Memory
Secondary
memory
Page A 0
B 1
C 2
D 3 Virtual Address space Page Fault
CKV