Carc 07.03
alessandro.bogliolo@uniurb.it
07. Memory
07.03.b Virtual Memory
• Reference locality
• Caching
• Virtual memory
Computer Architecture
alessandro.bogliolo@uniurb.it
Carc 07.03
alessandro.bogliolo@uniurb.it
Virtual memory
• Uses secondary storage to
extend the address space
beyond physical memory
• The CPU produces Virtual
addresses that need to be
translated into Physical
addresses
• Relocation: a program can
run in any location in physical
memory
• Protection: a process can
access only the memory
blocks allocated to it
Carc 07.03
alessandro.bogliolo@uniurb.it
Virtual memory vs caches
Caching Virtual Memory
Cache Main Memory
Main Memory Disk
Block Segment / Page
Cache miss Page fault
Replacement mainly
controlled by HW
Raplecement mainly
controlled by SW
Parameter L1 Cache Virtual Memory
Block (page) size 16-128 bytes 4 - 64 Kbyte
Hit time 1-3 Tclk 50-150 Tclk
Miss penalty 8-150 Tclk 106
-107
Tclk
(access time) 6-130 Tclk 8E5-8E6 Tclk
(transfer time) 2-20 Tclk 2E5-2E6 Tclk
Miss rate 0.1-10% 0.00001-0.001%
Mapping 25-45 bit to 14-20 32-64 bit to 25-45
Carc 07.03
alessandro.bogliolo@uniurb.it
Segments vs pages
Page Segment
Block size Constant Variable
Words per address One Two (segment and offset)
Visibility Invisible to application
programmer
May be visible to application
programmer
Replacement Trivial (all blocks are the
same size)
Hard (must find contiguous,
variable-size, unused space in
main memory)
Fragmentation Internal (unused portion of
a page)
External (unused space
between segments)
Disk traffic Efficient (adjust page size
to balance access time
and transfer time)
Inefficient (small segments
may transfer only a few bytes)
Carc 07.03
alessandro.bogliolo@uniurb.it
Virtual Mem: page placement
• Address miss involves access to secondary storage
• Very long miss penalty imposes to reduce miss rate
• Memory hit of non-cached addresses takes tens of
clock cycles
• Memory access time hides block identification time
• The block placement strategy in main memory is
typically fully-associative
• Replacement policy is usually LRU
Carc 07.03
alessandro.bogliolo@uniurb.it
Virtual Mem: page identification
• Both paging and segmentation rely on data
structures indexed by the page or segment number
Carc 07.03
alessandro.bogliolo@uniurb.it
Address translation
CPU MMUVirtual Physical
vpn po
rpn rpn
page table
po
PT
RAM
Carc 07.03
alessandro.bogliolo@uniurb.it
Address translation
(paged page table)
CPU MMUVirtual Physical
vpn1 po
PT2 rpn
page table
po
PT
vpn2
rpn
RAM
Carc 07.03
alessandro.bogliolo@uniurb.it
Address translation
(Translation Lookaside Buffer, TLB)
Carc 07.03
alessandro.bogliolo@uniurb.it
Cache and Virtual memory
Physical cache: address translation needed to access the cache
CPU MMUVirtual Physical RAMCache
CPU MMUVirtual Physical RAM
Cache
Virtual cache: no address translation needed to access the cache

More Related Content

PPTX
Virtual memory (testing)
PPTX
Demand paging
PPT
Virtual memory
PPT
Virtual memory
PPTX
Organisation of cache memory
DOC
Virtual Memory vs Cache Memory
PPTX
Ppt cache vs virtual memory without animation
Virtual memory (testing)
Demand paging
Virtual memory
Virtual memory
Organisation of cache memory
Virtual Memory vs Cache Memory
Ppt cache vs virtual memory without animation

What's hot (20)

PPT
cache memory management
PPTX
Cache memory
PPT
Virtual Memory ,Direct memory addressing and indirect memory addressing prese...
PPT
Cache memory
PPTX
Cache memory
PPT
Memory organisation
PPTX
Cache design
PPT
Chapter 9 - Virtual Memory
PPTX
Cache memoy designed by Mohd Tariq
PPTX
Project Presentation Final
PPT
PPTX
Cache memory
PPT
Linux Memory
PPTX
Cache memory
PPTX
Cache memory
PPTX
Swapping | Computer Science
PPTX
Cache memory
PPTX
Cache memory
PPT
Cache
PPTX
Memory Organization
cache memory management
Cache memory
Virtual Memory ,Direct memory addressing and indirect memory addressing prese...
Cache memory
Cache memory
Memory organisation
Cache design
Chapter 9 - Virtual Memory
Cache memoy designed by Mohd Tariq
Project Presentation Final
Cache memory
Linux Memory
Cache memory
Cache memory
Swapping | Computer Science
Cache memory
Cache memory
Cache
Memory Organization
Ad

Similar to CArcMOOC 07.03b - Memory hierarchy - Virtual memory (20)

PPT
memory management and Virtual Memory.ppt
PPT
Cache replacement policies,cache miss,writingtechniques
PPT
Power Point Presentation on Virtual Memory.ppt
PPT
LECTURE13nvjlfdihbkzbjvzbfmdnmzbxckbn.ppt
PPTX
Virtual Memory (1).pptx
PDF
Virtual Memory 53565686598386865286860.pdf
PPT
Chapter 8 - Virtual memory - William stallings.ppt
PPTX
coafinal1-copy-150430204758-conversion-gate01.pptx
PPT
NOV11 virtual memory.ppt
PPT
Chapter 09 - Virtual Memory.ppt
PPTX
Computer architecture virtual memory
DOCX
virtual memory
PPT
Virtual Memory
PPT
Lec10 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part2
PPT
virtual memory.ppt
PDF
The life and times
PPT
Virtual memory Chapter 9 simple and easy
PPT
Chap8 Virtual Memory. 1997-2003.ppt
PPT
NOV11 virtual memory.ppt
PPTX
Abhaycavirtual memory and the pagehit.pptx
memory management and Virtual Memory.ppt
Cache replacement policies,cache miss,writingtechniques
Power Point Presentation on Virtual Memory.ppt
LECTURE13nvjlfdihbkzbjvzbfmdnmzbxckbn.ppt
Virtual Memory (1).pptx
Virtual Memory 53565686598386865286860.pdf
Chapter 8 - Virtual memory - William stallings.ppt
coafinal1-copy-150430204758-conversion-gate01.pptx
NOV11 virtual memory.ppt
Chapter 09 - Virtual Memory.ppt
Computer architecture virtual memory
virtual memory
Virtual Memory
Lec10 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part2
virtual memory.ppt
The life and times
Virtual memory Chapter 9 simple and easy
Chap8 Virtual Memory. 1997-2003.ppt
NOV11 virtual memory.ppt
Abhaycavirtual memory and the pagehit.pptx
Ad

More from Alessandro Bogliolo (20)

PDF
AIXMOOC 2.6 - Come funzionano i Large Language Models
PDF
AIXMOOC 6.1 - Non sono un robot (Dom Holdaway)
PDF
AIXMOOC 5.3 - L'essere umano di fronte all'I.A. (Cristiano Maria Bellei)
PDF
AIXMOOC 4.3 - Geopolitica dell'intelligenza artificiale (Alessandro Aresu)
PDF
AIXMOOC 3.3 - Linguaggio e capacità cognitive (Gabriella Bottini)
PDF
AIXMOOC 3.2 - Linguaggio e memoria (Manuela Berlingeri)
PDF
AIXMOOC 4.2 - IA e informazione (Fabio Giglietto)
PDF
AIXMOOC 2.5 - CPU e GPU per Machine Learning (Luca Benini)
PDF
AIXMOOC 5.2 - IA generativa e creatività
PDF
AIXMOOC 3.1 - L'acquisizione del linguaggio (Mirta Vernice)
PPTX
AIXMOOC 4.1 - Comunicare con l'IA (Giovanni Boccia Artieri)
PDF
AIXMOOC 2.4 - Intelligenza artificiale generativa (Mirco Musolesi)
PDF
AIXMOOC 2.3 - Modelli di reti neurali con esperimenti di addestramento
PDF
AIXMOOC 2.2 - Reti neurali e machine learning (Valerio Freschi)
PDF
AIXMOOC 2.1 - Il modello del neurone (Stefano Sartini)
PDF
AIXMOOC 1.4 - Macchine Calcolatrici e Intelligenza, di A. Turing
PDF
AIXMOOC 5.1 - EU AI Act - Il regolamento europeo (Lucilla Sioli)
PPTX
AIXMOOC 1.2 - Quando le macchine impararono a parlare
PDF
AIXMOOC 1.1 - L'esplosione dell'Intelligenza Artificiale - Introduzione
PDF
BIBMOOC 05.03 - Codici in biblioteca
AIXMOOC 2.6 - Come funzionano i Large Language Models
AIXMOOC 6.1 - Non sono un robot (Dom Holdaway)
AIXMOOC 5.3 - L'essere umano di fronte all'I.A. (Cristiano Maria Bellei)
AIXMOOC 4.3 - Geopolitica dell'intelligenza artificiale (Alessandro Aresu)
AIXMOOC 3.3 - Linguaggio e capacità cognitive (Gabriella Bottini)
AIXMOOC 3.2 - Linguaggio e memoria (Manuela Berlingeri)
AIXMOOC 4.2 - IA e informazione (Fabio Giglietto)
AIXMOOC 2.5 - CPU e GPU per Machine Learning (Luca Benini)
AIXMOOC 5.2 - IA generativa e creatività
AIXMOOC 3.1 - L'acquisizione del linguaggio (Mirta Vernice)
AIXMOOC 4.1 - Comunicare con l'IA (Giovanni Boccia Artieri)
AIXMOOC 2.4 - Intelligenza artificiale generativa (Mirco Musolesi)
AIXMOOC 2.3 - Modelli di reti neurali con esperimenti di addestramento
AIXMOOC 2.2 - Reti neurali e machine learning (Valerio Freschi)
AIXMOOC 2.1 - Il modello del neurone (Stefano Sartini)
AIXMOOC 1.4 - Macchine Calcolatrici e Intelligenza, di A. Turing
AIXMOOC 5.1 - EU AI Act - Il regolamento europeo (Lucilla Sioli)
AIXMOOC 1.2 - Quando le macchine impararono a parlare
AIXMOOC 1.1 - L'esplosione dell'Intelligenza Artificiale - Introduzione
BIBMOOC 05.03 - Codici in biblioteca

Recently uploaded (20)

PDF
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
PDF
English Textual Question & Ans (12th Class).pdf
PDF
LIFE & LIVING TRILOGY - PART - (2) THE PURPOSE OF LIFE.pdf
PDF
My India Quiz Book_20210205121199924.pdf
PDF
Empowerment Technology for Senior High School Guide
PDF
Complications of Minimal Access-Surgery.pdf
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PDF
Mucosal Drug Delivery system_NDDS_BPHARMACY__SEM VII_PCI.pdf
PDF
What if we spent less time fighting change, and more time building what’s rig...
PDF
Paper A Mock Exam 9_ Attempt review.pdf.
PDF
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
PDF
Environmental Education MCQ BD2EE - Share Source.pdf
PPTX
B.Sc. DS Unit 2 Software Engineering.pptx
PDF
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
PDF
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 2).pdf
PPTX
Introduction to pro and eukaryotes and differences.pptx
PDF
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
PDF
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 1).pdf
PPTX
Share_Module_2_Power_conflict_and_negotiation.pptx
PDF
LEARNERS WITH ADDITIONAL NEEDS ProfEd Topic
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
English Textual Question & Ans (12th Class).pdf
LIFE & LIVING TRILOGY - PART - (2) THE PURPOSE OF LIFE.pdf
My India Quiz Book_20210205121199924.pdf
Empowerment Technology for Senior High School Guide
Complications of Minimal Access-Surgery.pdf
A powerpoint presentation on the Revised K-10 Science Shaping Paper
Mucosal Drug Delivery system_NDDS_BPHARMACY__SEM VII_PCI.pdf
What if we spent less time fighting change, and more time building what’s rig...
Paper A Mock Exam 9_ Attempt review.pdf.
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
Environmental Education MCQ BD2EE - Share Source.pdf
B.Sc. DS Unit 2 Software Engineering.pptx
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 2).pdf
Introduction to pro and eukaryotes and differences.pptx
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 1).pdf
Share_Module_2_Power_conflict_and_negotiation.pptx
LEARNERS WITH ADDITIONAL NEEDS ProfEd Topic

CArcMOOC 07.03b - Memory hierarchy - Virtual memory