SlideShare a Scribd company logo
Virtual Memory
Muhammad Umer Farooq
12024119-015@uog.edu.pk
0331-0331-666
What is Virtual Memory 1
• The term virtual memory refers to
something which appears to be present
but actually it is not.
• Virtual memory allows users to use
more memory for a program than the
real memory of a computer.
History 2
• Virtual Memory was developed in
approximately 1959 – 1962, at the University
of Manchester for the Atlas Computer,
completed in 1962.
• In 1961, Burroughs released the B5000, the
first commercial computer with virtual
memory.
Uses of Virtual Memory 3
• The virtual addresses are used rather than real
addresses to store instructions and data.
• It is temporary memory which is used along
with ram of the system.
• When the program is actually executed, the
virtual addresses are converted into real
memory addresses again.
Address Space & Memory Space 4
• Virtual memory is the address used by the
programmer and the set of such addresses is
called address space.
• The set of actual main memory locations in
main memory is called the memory space.
Why is it needed…? 5
• Before the development of the virtual memory
technique, programmers have to manage
directly two-level storage such as main
memory or ram and secondary memory .
• Without virtual memory, It is too much
expensive to execute / manage the program as a
whole.
• Enlarge the address space, the set of addresses
a program can utilize.
Objectives… 6
• When a computer is executing many
programs at the same time, Virtual memory
make the computer to share memory
efficiently.
• Eliminate a restriction that a computer works
in memory which is small and be limited.
• When many programs are running at the same
time, by distributing each suitable memory
area to each program, VM protect the
programs to interfere each other in each
memory area.
Paging… 7
• To facilitate copying virtual memory into real
memory, the operating system divides virtual
memory into pages, each of which contains a
fixed number of addresses.
• Each page is stored on a disk until it is needed.
• When the page is needed, the operating system
copies it from disk to main memory, translating
the virtual addresses into real addresses.
Paging……(cont’d) 8
• The operating system copies a certain
number of pages from your storage
device to main memory.
• When a program needs a page that is
not in maim memory, the operating
system copies the required page into
memory and copies another page back
to the disk.
Virtual Memory (Paging) 9
Page table
Address Space
Page table
Address Space
Physical
Memory
Page fault 10
• An interrupt to the software raised by the
hardware when a program accesses a page that
is not mapped in physical memory.
• It occurs when a program accesses a memory
location in its memory and the page
corresponding to that memory is not loaded.
• when a program accesses a memory location in
its memory and the program does not have
rights to access the page corresponding to that
memory.
Paging replacement algorithms 11
• OPT(MIN) : eliminate the page that be not
expected to be used.
• FIFO(first input/first output) : rather than
choosing the victim page at random, the
oldest page is the first to be removed.
• LRU(Least Recently used) : move out the
page that is the least rarely used.
• LFU(Least Frequently used) : move out the
page that is not used often in the past.
Advantages… 12
• It has become so common because it provides a
big benefit for users at a very low cost.
• program is no longer constrained by the amount
of physical memory.
• user would be able to write programs for an
extremely large virtual address space.
• more programs could be run at the same time
• increase CPU utilization and throughput.
• less I/O would be needed to load or swap each
user program
Disadvantages 13
• Applications run slower if the system is
using virtual memory.
• It take more time to switch between
applications.
• Less hard drive space for your use.
• It reduces system stability.

More Related Content

What's hot

virtual memory
virtual memoryvirtual memory
virtual memory
Abeer Naskar
 
Memory management
Memory managementMemory management
Memory management
Muhammad Fayyaz
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
Shashank Shetty
 
Memory organization
Memory organizationMemory organization
Memory organization
AL- AMIN
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
aaina_katyal
 
Memory management
Memory managementMemory management
Memory management
Rajni Sirohi
 
Virtual memory ppt
Virtual memory pptVirtual memory ppt
Memory Organization
Memory OrganizationMemory Organization
Memory Organization
Kamal Acharya
 
Paging and Segmentation in Operating System
Paging and Segmentation in Operating SystemPaging and Segmentation in Operating System
Paging and Segmentation in Operating System
Raj Mohan
 
Chapter 9 - Virtual Memory
Chapter 9 - Virtual MemoryChapter 9 - Virtual Memory
Chapter 9 - Virtual Memory
Wayne Jones Jnr
 
Memory Hierarchy
Memory HierarchyMemory Hierarchy
Memory Hierarchy
chauhankapil
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
aaina_katyal
 
Pipelining and vector processing
Pipelining and vector processingPipelining and vector processing
Pipelining and vector processing
Kamal Acharya
 
Virtual memory ppt
Virtual memory pptVirtual memory ppt
Virtual memory ppt
RITULDE
 
Paging and segmentation
Paging and segmentationPaging and segmentation
Paging and segmentation
Piyush Rochwani
 
Memory Hierarchy
Memory HierarchyMemory Hierarchy
Memory Hierarchy
Trinity Dwarka
 
Memory management
Memory managementMemory management
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory management
rprajat007
 
Memory management
Memory managementMemory management
Memory management
Vishal Singh
 
Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)
Gaditek
 

What's hot (20)

virtual memory
virtual memoryvirtual memory
virtual memory
 
Memory management
Memory managementMemory management
Memory management
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
 
Memory organization
Memory organizationMemory organization
Memory organization
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
 
Memory management
Memory managementMemory management
Memory management
 
Virtual memory ppt
Virtual memory pptVirtual memory ppt
Virtual memory ppt
 
Memory Organization
Memory OrganizationMemory Organization
Memory Organization
 
Paging and Segmentation in Operating System
Paging and Segmentation in Operating SystemPaging and Segmentation in Operating System
Paging and Segmentation in Operating System
 
Chapter 9 - Virtual Memory
Chapter 9 - Virtual MemoryChapter 9 - Virtual Memory
Chapter 9 - Virtual Memory
 
Memory Hierarchy
Memory HierarchyMemory Hierarchy
Memory Hierarchy
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
 
Pipelining and vector processing
Pipelining and vector processingPipelining and vector processing
Pipelining and vector processing
 
Virtual memory ppt
Virtual memory pptVirtual memory ppt
Virtual memory ppt
 
Paging and segmentation
Paging and segmentationPaging and segmentation
Paging and segmentation
 
Memory Hierarchy
Memory HierarchyMemory Hierarchy
Memory Hierarchy
 
Memory management
Memory managementMemory management
Memory management
 
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory management
 
Memory management
Memory managementMemory management
Memory management
 
Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)
 

Similar to Virtual memory

Power Point Presentation on Virtual Memory.ppt
Power Point Presentation on Virtual Memory.pptPower Point Presentation on Virtual Memory.ppt
Power Point Presentation on Virtual Memory.ppt
RahulRaj395610
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
Muhammad Asad Chattha
 
NOV11 virtual memory.ppt
NOV11 virtual memory.pptNOV11 virtual memory.ppt
NOV11 virtual memory.ppt
AshokRachapalli1
 
Chapter 09 - Virtual Memory.ppt
Chapter 09 - Virtual Memory.pptChapter 09 - Virtual Memory.ppt
Chapter 09 - Virtual Memory.ppt
MonirJihad1
 
virtual memory.ppt
virtual memory.pptvirtual memory.ppt
virtual memory.ppt
suryansh85
 
NOV11 virtual memory.ppt
NOV11 virtual memory.pptNOV11 virtual memory.ppt
NOV11 virtual memory.ppt
PratikBose10
 
Abhaycavirtual memory and the pagehit.pptx
Abhaycavirtual memory and the pagehit.pptxAbhaycavirtual memory and the pagehit.pptx
Abhaycavirtual memory and the pagehit.pptx
wemoji5816
 
OS Presentation 2023.pptx
OS Presentation 2023.pptxOS Presentation 2023.pptx
OS Presentation 2023.pptx
ShayanAli68
 
CSI-503 - 9. Virtual Memory
CSI-503 - 9. Virtual MemoryCSI-503 - 9. Virtual Memory
CSI-503 - 9. Virtual Memory
ghayour abbas
 
Virtual Memory in Windows
Virtual Memory in Windows Virtual Memory in Windows
Virtual Memory in Windows
HanzlaRafique
 
Virtual Memory Management Part - I.pdf
Virtual Memory Management Part - I.pdfVirtual Memory Management Part - I.pdf
Virtual Memory Management Part - I.pdf
Harika Pudugosula
 
virtualmemory-111228090333-phpapp02 (1).pdf
virtualmemory-111228090333-phpapp02 (1).pdfvirtualmemory-111228090333-phpapp02 (1).pdf
virtualmemory-111228090333-phpapp02 (1).pdf
ArchanaPandiyan
 
Virtual Memory
Virtual MemoryVirtual Memory
Virtual Memory
vampugani
 
Virtual memory 20070222-en
Virtual memory 20070222-enVirtual memory 20070222-en
Virtual memory 20070222-en
Tetsuyuki Kobayashi
 
Lecture 8- Virtual Memory Final.pptx
Lecture 8- Virtual Memory Final.pptxLecture 8- Virtual Memory Final.pptx
Lecture 8- Virtual Memory Final.pptx
Amanuelmergia
 
Cache memory and virtual memory
Cache memory and virtual memoryCache memory and virtual memory
Cache memory and virtual memory
PrakharBansal29
 
The life and times
The life and timesThe life and times
The life and times
Abeer Naskar
 
VirutualMemory.docx
VirutualMemory.docxVirutualMemory.docx
VirutualMemory.docx
rangarajansoft69
 
1 Module - Operating Systems Configuration and Use by Mark John Lado
1 Module - Operating Systems Configuration and Use by Mark John Lado1 Module - Operating Systems Configuration and Use by Mark John Lado
1 Module - Operating Systems Configuration and Use by Mark John Lado
Mark John Lado, MIT
 
Operating Systems FYBSC IT UNIT I- Introduction to Operating Systems
Operating Systems FYBSC IT UNIT I- Introduction to Operating SystemsOperating Systems FYBSC IT UNIT I- Introduction to Operating Systems
Operating Systems FYBSC IT UNIT I- Introduction to Operating Systems
Arti Parab Academics
 

Similar to Virtual memory (20)

Power Point Presentation on Virtual Memory.ppt
Power Point Presentation on Virtual Memory.pptPower Point Presentation on Virtual Memory.ppt
Power Point Presentation on Virtual Memory.ppt
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
 
NOV11 virtual memory.ppt
NOV11 virtual memory.pptNOV11 virtual memory.ppt
NOV11 virtual memory.ppt
 
Chapter 09 - Virtual Memory.ppt
Chapter 09 - Virtual Memory.pptChapter 09 - Virtual Memory.ppt
Chapter 09 - Virtual Memory.ppt
 
virtual memory.ppt
virtual memory.pptvirtual memory.ppt
virtual memory.ppt
 
NOV11 virtual memory.ppt
NOV11 virtual memory.pptNOV11 virtual memory.ppt
NOV11 virtual memory.ppt
 
Abhaycavirtual memory and the pagehit.pptx
Abhaycavirtual memory and the pagehit.pptxAbhaycavirtual memory and the pagehit.pptx
Abhaycavirtual memory and the pagehit.pptx
 
OS Presentation 2023.pptx
OS Presentation 2023.pptxOS Presentation 2023.pptx
OS Presentation 2023.pptx
 
CSI-503 - 9. Virtual Memory
CSI-503 - 9. Virtual MemoryCSI-503 - 9. Virtual Memory
CSI-503 - 9. Virtual Memory
 
Virtual Memory in Windows
Virtual Memory in Windows Virtual Memory in Windows
Virtual Memory in Windows
 
Virtual Memory Management Part - I.pdf
Virtual Memory Management Part - I.pdfVirtual Memory Management Part - I.pdf
Virtual Memory Management Part - I.pdf
 
virtualmemory-111228090333-phpapp02 (1).pdf
virtualmemory-111228090333-phpapp02 (1).pdfvirtualmemory-111228090333-phpapp02 (1).pdf
virtualmemory-111228090333-phpapp02 (1).pdf
 
Virtual Memory
Virtual MemoryVirtual Memory
Virtual Memory
 
Virtual memory 20070222-en
Virtual memory 20070222-enVirtual memory 20070222-en
Virtual memory 20070222-en
 
Lecture 8- Virtual Memory Final.pptx
Lecture 8- Virtual Memory Final.pptxLecture 8- Virtual Memory Final.pptx
Lecture 8- Virtual Memory Final.pptx
 
Cache memory and virtual memory
Cache memory and virtual memoryCache memory and virtual memory
Cache memory and virtual memory
 
The life and times
The life and timesThe life and times
The life and times
 
VirutualMemory.docx
VirutualMemory.docxVirutualMemory.docx
VirutualMemory.docx
 
1 Module - Operating Systems Configuration and Use by Mark John Lado
1 Module - Operating Systems Configuration and Use by Mark John Lado1 Module - Operating Systems Configuration and Use by Mark John Lado
1 Module - Operating Systems Configuration and Use by Mark John Lado
 
Operating Systems FYBSC IT UNIT I- Introduction to Operating Systems
Operating Systems FYBSC IT UNIT I- Introduction to Operating SystemsOperating Systems FYBSC IT UNIT I- Introduction to Operating Systems
Operating Systems FYBSC IT UNIT I- Introduction to Operating Systems
 

Recently uploaded

Observational Learning
Observational Learning Observational Learning
Observational Learning
sanamushtaq922
 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
RidwanHassanYusuf
 
Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
Iris Thiele Isip-Tan
 
Data Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsxData Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsx
Prof. Dr. K. Adisesha
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
Steve Thomason
 
How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17
Celine George
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
deepaannamalai16
 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
RamseyBerglund
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Henry Hollis
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
David Douglas School District
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
deepaannamalai16
 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
khuleseema60
 
220711130088 Sumi Basak Virtual University EPC 3.pptx
220711130088 Sumi Basak Virtual University EPC 3.pptx220711130088 Sumi Basak Virtual University EPC 3.pptx
220711130088 Sumi Basak Virtual University EPC 3.pptx
Kalna College
 
Accounting for Restricted Grants When and How To Record Properly
Accounting for Restricted Grants  When and How To Record ProperlyAccounting for Restricted Grants  When and How To Record Properly
Accounting for Restricted Grants When and How To Record Properly
TechSoup
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
Kalna College
 
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
ImMuslim
 
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdfمصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
سمير بسيوني
 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
zuzanka
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
nitinpv4ai
 

Recently uploaded (20)

Observational Learning
Observational Learning Observational Learning
Observational Learning
 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
 
Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
 
Data Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsxData Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsx
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
 
How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
 
220711130088 Sumi Basak Virtual University EPC 3.pptx
220711130088 Sumi Basak Virtual University EPC 3.pptx220711130088 Sumi Basak Virtual University EPC 3.pptx
220711130088 Sumi Basak Virtual University EPC 3.pptx
 
Accounting for Restricted Grants When and How To Record Properly
Accounting for Restricted Grants  When and How To Record ProperlyAccounting for Restricted Grants  When and How To Record Properly
Accounting for Restricted Grants When and How To Record Properly
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
 
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
 
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdfمصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
 

Virtual memory

  • 1. Virtual Memory Muhammad Umer Farooq 12024119-015@uog.edu.pk 0331-0331-666
  • 2. What is Virtual Memory 1 • The term virtual memory refers to something which appears to be present but actually it is not. • Virtual memory allows users to use more memory for a program than the real memory of a computer.
  • 3. History 2 • Virtual Memory was developed in approximately 1959 – 1962, at the University of Manchester for the Atlas Computer, completed in 1962. • In 1961, Burroughs released the B5000, the first commercial computer with virtual memory.
  • 4. Uses of Virtual Memory 3 • The virtual addresses are used rather than real addresses to store instructions and data. • It is temporary memory which is used along with ram of the system. • When the program is actually executed, the virtual addresses are converted into real memory addresses again.
  • 5. Address Space & Memory Space 4 • Virtual memory is the address used by the programmer and the set of such addresses is called address space. • The set of actual main memory locations in main memory is called the memory space.
  • 6. Why is it needed…? 5 • Before the development of the virtual memory technique, programmers have to manage directly two-level storage such as main memory or ram and secondary memory . • Without virtual memory, It is too much expensive to execute / manage the program as a whole. • Enlarge the address space, the set of addresses a program can utilize.
  • 7. Objectives… 6 • When a computer is executing many programs at the same time, Virtual memory make the computer to share memory efficiently. • Eliminate a restriction that a computer works in memory which is small and be limited. • When many programs are running at the same time, by distributing each suitable memory area to each program, VM protect the programs to interfere each other in each memory area.
  • 8. Paging… 7 • To facilitate copying virtual memory into real memory, the operating system divides virtual memory into pages, each of which contains a fixed number of addresses. • Each page is stored on a disk until it is needed. • When the page is needed, the operating system copies it from disk to main memory, translating the virtual addresses into real addresses.
  • 9. Paging……(cont’d) 8 • The operating system copies a certain number of pages from your storage device to main memory. • When a program needs a page that is not in maim memory, the operating system copies the required page into memory and copies another page back to the disk.
  • 10. Virtual Memory (Paging) 9 Page table Address Space Page table Address Space Physical Memory
  • 11. Page fault 10 • An interrupt to the software raised by the hardware when a program accesses a page that is not mapped in physical memory. • It occurs when a program accesses a memory location in its memory and the page corresponding to that memory is not loaded. • when a program accesses a memory location in its memory and the program does not have rights to access the page corresponding to that memory.
  • 12. Paging replacement algorithms 11 • OPT(MIN) : eliminate the page that be not expected to be used. • FIFO(first input/first output) : rather than choosing the victim page at random, the oldest page is the first to be removed. • LRU(Least Recently used) : move out the page that is the least rarely used. • LFU(Least Frequently used) : move out the page that is not used often in the past.
  • 13. Advantages… 12 • It has become so common because it provides a big benefit for users at a very low cost. • program is no longer constrained by the amount of physical memory. • user would be able to write programs for an extremely large virtual address space. • more programs could be run at the same time • increase CPU utilization and throughput. • less I/O would be needed to load or swap each user program
  • 14. Disadvantages 13 • Applications run slower if the system is using virtual memory. • It take more time to switch between applications. • Less hard drive space for your use. • It reduces system stability.