SlideShare a Scribd company logo
Malwa Institute of
Science and
Technology, Indore
Submitted to : Gayatri lodhi
Submitted by : Tushar Prajapati
Diploma CS 2nd year
9098889654
Virtual Memory
Memory
register
CPU cache
Main Memory
Secondary Storage
Server (or INTERNET)
• larger capacity
• lower speed
• lower cost
What is…
 Virtual memory as an alternate set of
memory addresses.
 Programs use these virtual addresses
rather than real addresses to store
instructions and data.
 When the program is actually executed,
the virtual addresses are converted into
real memory addresses.
History
 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.
Why is it needed….
 Before the development of the virtual memory
technique, programmers in the 1940s and
1950s had to manage directly two-level
storage such as main memory or ram and
secondary memory in the form of hard disks
or earlier, magnetic drums.
 Enlarge the address space, the set of
addresses a program can utilize.
 Virtual memory might contain twice as many
addresses as main memory.
Object…
 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 is running at the same
time, by distributing each suitable memory
area to each program, VM protect programs
to interfere each other in each memory area.
How does it work…
 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.
MMU (Memory Management Unit)
 The hardware base that makes a virtual memory
system possible.
 Allows software to reference physical memory by
virtual addresses, quite often more than one.
 It accomplishes this through the use of page and
page tables.
 Use a section of memory to translate virtual
addresses into physical addresses via a series of
table lookups.
 The software that handles the page fault is generally
part of an operating system and the hardware that
detects this situation.
Segmentation……
 Segmentation involves the relocation of variable sized
segments into the physical address space.
 Generally these segments are contiguous units, and
are referred to in programs by their segment number
and an offset to the requested data.
 Efficient segmentation relies on programs that are
very thoughtfully written for their target system.
 Since segmentation relies on memory that is located
in single large blocks, it is very possible that enough
free space is available to load a new module, but can
not be utilized.
 Segmentation may also suffer from internal
fragmentation if segments are not variable-sized,
where memory above the segment is not used by the
program but is still “reserved” for it.
Paging……
 Paging provides a somewhat easier interface for
programs, in that its operation tends to be more
automatic and thus transparent.
 Each unit of transfer, referred to as a page, is of a
fixed size and swapped by the virtual memory
manager outside of the program’s control.
 Instead of utilizing a segment/offset addressing
approach, as seen in segmentation, paging uses a
linear sequence of virtual addresses which are
mapped to physical memory as necessary.
 Due to this addressing approach, a single program
may refer to series of many non-contiguous
segments.
 Although some internal fragmentation may still exist
due to the fixed size of the pages, the approach
virtually eliminates external fragmentation.
Paging……(cont’d)
 A technique used by virtual memory operating
systems to help ensure that the data you
need is available as quickly as possible.
 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)
Page table
Address Space
Page table
Address Space
Physical
Memory
Page fault
 An interrupt to the software raised by the
hardware when a program accesses a page
that is not mapped in physical memory.
 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
privileges to access the page corresponding
to that memory.
Paging replacement algorithms
 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.
Summary…
 Virtual memory is a common part of most operating
systems on computers.
 It has become so common because it provides a big
benefit for users at a very low cost.
 benefits of executing a program that is only partially
in memory.
 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
⇒ run faster
Thank you

More Related Content

Similar to virtual memory.ppt

Paging +Algorithem+Segmentation+memory management
Paging +Algorithem+Segmentation+memory managementPaging +Algorithem+Segmentation+memory management
Paging +Algorithem+Segmentation+memory management
kazim Hussain
 
Os
OsOs
Os unit 2
Os unit 2Os unit 2
Os unit 2
Arnav Chowdhury
 
An Efficient Virtual Memory using Graceful Code
An Efficient Virtual Memory using Graceful CodeAn Efficient Virtual Memory using Graceful Code
An Efficient Virtual Memory using Graceful Code
ijtsrd
 
Computer architecture virtual memory
Computer architecture virtual memoryComputer architecture virtual memory
Computer architecture virtual memory
Mazin Alwaaly
 
Virtual memory presentation
Virtual memory presentationVirtual memory presentation
Virtual memory presentation
Ranjeet Kumar
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
Muhammad Farooq
 
Virtual Memory ,Direct memory addressing and indirect memory addressing prese...
Virtual Memory ,Direct memory addressing and indirect memory addressing prese...Virtual Memory ,Direct memory addressing and indirect memory addressing prese...
Virtual Memory ,Direct memory addressing and indirect memory addressing prese...
ITM University
 
Chapter 2 part 1
Chapter 2 part 1Chapter 2 part 1
Chapter 2 part 1rohassanie
 
virtual memory
virtual memoryvirtual memory
virtual memory
Abeer Naskar
 
Android Memory Management
Android Memory ManagementAndroid Memory Management
Android Memory Management
Sadmankabirsoumik
 
CSI-503 - 9. Virtual Memory
CSI-503 - 9. Virtual MemoryCSI-503 - 9. Virtual Memory
CSI-503 - 9. Virtual Memory
ghayour abbas
 
Operating system Memory management
Operating system Memory management Operating system Memory management
Operating system Memory management
Shashank Asthana
 
virtual memory - Computer operating system
virtual memory - Computer operating systemvirtual memory - Computer operating system
virtual memory - Computer operating system
Electronics - Embedded System
 
Virtual Memory
Virtual MemoryVirtual Memory
Virtual Memory
sanjana mun
 
VirutualMemory.docx
VirutualMemory.docxVirutualMemory.docx
VirutualMemory.docx
rangarajansoft69
 
virtualmemory-111228090333-phpapp02 (1).pdf
virtualmemory-111228090333-phpapp02 (1).pdfvirtualmemory-111228090333-phpapp02 (1).pdf
virtualmemory-111228090333-phpapp02 (1).pdf
ArchanaPandiyan
 
ppt
pptppt
How many total bits are required for a direct-mapped cache with 2048 .pdf
How many total bits are required for a direct-mapped cache with 2048 .pdfHow many total bits are required for a direct-mapped cache with 2048 .pdf
How many total bits are required for a direct-mapped cache with 2048 .pdf
Eye2eyeopticians10
 
Presentation on Virtual Memory concepts in computer
Presentation on Virtual Memory concepts in computer Presentation on Virtual Memory concepts in computer
Presentation on Virtual Memory concepts in computer
Oshin Kandpal
 

Similar to virtual memory.ppt (20)

Paging +Algorithem+Segmentation+memory management
Paging +Algorithem+Segmentation+memory managementPaging +Algorithem+Segmentation+memory management
Paging +Algorithem+Segmentation+memory management
 
Os
OsOs
Os
 
Os unit 2
Os unit 2Os unit 2
Os unit 2
 
An Efficient Virtual Memory using Graceful Code
An Efficient Virtual Memory using Graceful CodeAn Efficient Virtual Memory using Graceful Code
An Efficient Virtual Memory using Graceful Code
 
Computer architecture virtual memory
Computer architecture virtual memoryComputer architecture virtual memory
Computer architecture virtual memory
 
Virtual memory presentation
Virtual memory presentationVirtual memory presentation
Virtual memory presentation
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
 
Virtual Memory ,Direct memory addressing and indirect memory addressing prese...
Virtual Memory ,Direct memory addressing and indirect memory addressing prese...Virtual Memory ,Direct memory addressing and indirect memory addressing prese...
Virtual Memory ,Direct memory addressing and indirect memory addressing prese...
 
Chapter 2 part 1
Chapter 2 part 1Chapter 2 part 1
Chapter 2 part 1
 
virtual memory
virtual memoryvirtual memory
virtual memory
 
Android Memory Management
Android Memory ManagementAndroid Memory Management
Android Memory Management
 
CSI-503 - 9. Virtual Memory
CSI-503 - 9. Virtual MemoryCSI-503 - 9. Virtual Memory
CSI-503 - 9. Virtual Memory
 
Operating system Memory management
Operating system Memory management Operating system Memory management
Operating system Memory management
 
virtual memory - Computer operating system
virtual memory - Computer operating systemvirtual memory - Computer operating system
virtual memory - Computer operating system
 
Virtual Memory
Virtual MemoryVirtual Memory
Virtual Memory
 
VirutualMemory.docx
VirutualMemory.docxVirutualMemory.docx
VirutualMemory.docx
 
virtualmemory-111228090333-phpapp02 (1).pdf
virtualmemory-111228090333-phpapp02 (1).pdfvirtualmemory-111228090333-phpapp02 (1).pdf
virtualmemory-111228090333-phpapp02 (1).pdf
 
ppt
pptppt
ppt
 
How many total bits are required for a direct-mapped cache with 2048 .pdf
How many total bits are required for a direct-mapped cache with 2048 .pdfHow many total bits are required for a direct-mapped cache with 2048 .pdf
How many total bits are required for a direct-mapped cache with 2048 .pdf
 
Presentation on Virtual Memory concepts in computer
Presentation on Virtual Memory concepts in computer Presentation on Virtual Memory concepts in computer
Presentation on Virtual Memory concepts in computer
 

Recently uploaded

一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
ClaraZara1
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
Mukeshwaran Balu
 
Online aptitude test management system project report.pdf
Online aptitude test management system project report.pdfOnline aptitude test management system project report.pdf
Online aptitude test management system project report.pdf
Kamal Acharya
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
Self-Control of Emotions by Slidesgo.pptx
Self-Control of Emotions by Slidesgo.pptxSelf-Control of Emotions by Slidesgo.pptx
Self-Control of Emotions by Slidesgo.pptx
iemerc2024
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
heavyhaig
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
symbo111
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
zwunae
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
Fundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptxFundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptx
manasideore6
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
aqil azizi
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 

Recently uploaded (20)

一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
 
Online aptitude test management system project report.pdf
Online aptitude test management system project report.pdfOnline aptitude test management system project report.pdf
Online aptitude test management system project report.pdf
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
Self-Control of Emotions by Slidesgo.pptx
Self-Control of Emotions by Slidesgo.pptxSelf-Control of Emotions by Slidesgo.pptx
Self-Control of Emotions by Slidesgo.pptx
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
Fundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptxFundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptx
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 

virtual memory.ppt

  • 1. Malwa Institute of Science and Technology, Indore Submitted to : Gayatri lodhi Submitted by : Tushar Prajapati Diploma CS 2nd year 9098889654
  • 3. Memory register CPU cache Main Memory Secondary Storage Server (or INTERNET) • larger capacity • lower speed • lower cost
  • 4. What is…  Virtual memory as an alternate set of memory addresses.  Programs use these virtual addresses rather than real addresses to store instructions and data.  When the program is actually executed, the virtual addresses are converted into real memory addresses.
  • 5. History  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.
  • 6. Why is it needed….  Before the development of the virtual memory technique, programmers in the 1940s and 1950s had to manage directly two-level storage such as main memory or ram and secondary memory in the form of hard disks or earlier, magnetic drums.  Enlarge the address space, the set of addresses a program can utilize.  Virtual memory might contain twice as many addresses as main memory.
  • 7. Object…  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 is running at the same time, by distributing each suitable memory area to each program, VM protect programs to interfere each other in each memory area.
  • 8. How does it work…  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. MMU (Memory Management Unit)  The hardware base that makes a virtual memory system possible.  Allows software to reference physical memory by virtual addresses, quite often more than one.  It accomplishes this through the use of page and page tables.  Use a section of memory to translate virtual addresses into physical addresses via a series of table lookups.  The software that handles the page fault is generally part of an operating system and the hardware that detects this situation.
  • 10. Segmentation……  Segmentation involves the relocation of variable sized segments into the physical address space.  Generally these segments are contiguous units, and are referred to in programs by their segment number and an offset to the requested data.  Efficient segmentation relies on programs that are very thoughtfully written for their target system.  Since segmentation relies on memory that is located in single large blocks, it is very possible that enough free space is available to load a new module, but can not be utilized.  Segmentation may also suffer from internal fragmentation if segments are not variable-sized, where memory above the segment is not used by the program but is still “reserved” for it.
  • 11. Paging……  Paging provides a somewhat easier interface for programs, in that its operation tends to be more automatic and thus transparent.  Each unit of transfer, referred to as a page, is of a fixed size and swapped by the virtual memory manager outside of the program’s control.  Instead of utilizing a segment/offset addressing approach, as seen in segmentation, paging uses a linear sequence of virtual addresses which are mapped to physical memory as necessary.  Due to this addressing approach, a single program may refer to series of many non-contiguous segments.  Although some internal fragmentation may still exist due to the fixed size of the pages, the approach virtually eliminates external fragmentation.
  • 12. Paging……(cont’d)  A technique used by virtual memory operating systems to help ensure that the data you need is available as quickly as possible.  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.
  • 13. Virtual Memory (Paging) Page table Address Space Page table Address Space Physical Memory
  • 14. Page fault  An interrupt to the software raised by the hardware when a program accesses a page that is not mapped in physical memory.  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 privileges to access the page corresponding to that memory.
  • 15. Paging replacement algorithms  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.
  • 16. Summary…  Virtual memory is a common part of most operating systems on computers.  It has become so common because it provides a big benefit for users at a very low cost.  benefits of executing a program that is only partially in memory.  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 ⇒ run faster