















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
















































Objectives
?
What goes where?
Solution: Indirection
“All problems in computer science can be solved by another level of indirection... Except for the problem of too many layers of indirection.” – David Wheeler
Physical memory
Virtual memory
Virtual memory
mapping
Address Spaces
A System Using Virtual Addressing
Main memory
Physical address (PA)
Data word
Virtual address (VA)
Why Virtual Memory (VM)?
VM as a Tool for Caching
PP 2m-p-
Physical memory
Empty
Empty
Uncached
VP 0 VP 1
VP 2n-p-
Virtual memory
Unallocated Cached Uncached Unallocated Cached Uncached
PP 0 PP 1
Empty Cached
0
2 n-
2 m-
0
Virtual pages (VP's) stored on disk
Physical pages (PP's) cached in DRAM
Disk
Memory Hierarchy: Core 2 Duo
Disk
unified cache
I-cache
D-cache
CPU Reg
Throughput: 16 B/cycle 8 B/cycle 2 B/cycle 1 B/30 cycles
Latency: 3 cycles 14 cycles 100 cycles millions
A System Using Virtual Addressing
Main memory
Physical address (PA)
Data word
Virtual address (VA)
Address Translation: Page Tables
null
null
Memory resident page table (DRAM)
Physical memory (DRAM)
VP 7 VP 4
Virtual memory (disk)
Valid 0 1 0 1 0 1
0
1
Physical page number or disk address PTE 0
VP 2
VP 1
VP 1 VP 2
VP 4 VP 6 VP 7
VP 3
Page Hit
null
null
Memory resident page table (DRAM)
Physical memory (DRAM)
VP 7 VP 4
Virtual memory (disk)
Valid 0 1 0 1 0 1
0
1
Physical page number or disk address PTE 0
VP 2
VP 1
VP 1 VP 2
VP 4 VP 6 VP 7
VP 3
Virtual address
Page Miss
null
null
Memory resident page table (DRAM)
Physical memory (DRAM)
VP 7 VP 4
Virtual memory (disk)
Valid 0 1 0 1 0 1
0
1
Physical page number or disk address PTE 0
VP 2
VP 1
VP 1 VP 2
VP 4 VP 6 VP 7
VP 3
Virtual address