SlideShare a Scribd company logo
1 of 13
VIRTUAL MEMORY
Present by: -
Ravisha Sethi
CONTENTS

 virtual memory
 Needs of virtual memory

 Importance of virtual memory

 Advantage of virtual memory

 Disadvantage of virtual memory

 Address space & memory space

 Page replacement algorithms

 FIFO

 LRU

 OPT
VIRTUAL MEMORY
   Virtual memory is a common part of operating system on desktop
    computers.
   The term virtual memory refers to something which appears to be present
    but actually it is not.
   The virtual memory technique allows users to use more memory for a
    program than the real memory of a computer.

                                               present
                           Mapper
   CPU           (1)                           (3) Page
                                 (4)           frame + x
 Logical               Not present
                                 Page
 page + x
                                 frames

 Virtual                                              (5)
 address                                                      Page frames

Secondary
storage
NEED OF VIRTUAL MEMORY
 Virtual memory is a imaginary memory which we are
  assuming. If we have a material that exceed your
  memory at that time we need to use the concept of virtual
  memory.
 virtual memory is temporary memory which is used
  along with the ram of the system.
IMPORTANCE OF VIRTUAL MEMORY
 When your computer runs out of physical memory it
  writes what it needs to remember to the hard disc in a
  swap file as virtual memory.
 If a computer running Windows requires more
  memory/RAM then there is installed in the system to run
  a program, etc, it uses a small section of the hard drive
  for this purpose
ADDRESS SPACE AND MEMORY SPACE
 Virtual memory is the address used by the programmer
  and the set of such addresses is called address space.
 An address in main memory is called a physical address.

 The set of such locations in main memory is called the
  memory space.
 Thus the memory space consist of the actual main
  memory locations directly addressable for processing.
PAGE REPLACEMENT ALGORITHMS
 In a computer operating system that uses paging for
  virtual memory management, page replacement
  algorithm decide which memory pages to page out.
  When a page of memory need to be allocated.
 FIFO (first in first out)

 LRU (Least Recently used)

 OPT (Optimal)
FIFO
   First in first out is very easy to implement.
   The fifo algorithm select the page for replacement
   that has been in memory the longest time.

time 1     2     3     4     5      6    7      8    9      10     11     12
page P2    p3    p2    p1    p5    p2    p4    p5    p3     p2     p5     p2

     p2*   p2*   p2*   p2*   P5    p5    p5*   p5*    P3    P3      P3    P3*

           p3    p3    P3    p3*   P2    P2    P2     p2*   P2*     P5    P5
                                                      p4
                       P1    p1    P1*   p4    p4           p4      P4*   p2

                 hit                           hit           hit
LRU
 The least recently used page replacement algorithm
  keeps track page uses over a short period of time.
 The LRU algorithm can be implemented by associating a
  counter with every page that is n main memory.


time 1    2     3     4     5      6    7      8     9      10    11     12
pag P2    p3    p2    p1    p5    p2    p4    p5     p3     p2    p5     p2
e
    p2*   p2*   P2    P2    p2*   P2    P2    p2*     P3    P3     P3*   P3*

          p3    p3*   p3*   P5    P5    p5*   P5      P5    P5*    P5    P5
                                                      p4*
                      P1    P1    P1*   p4    P4            P2     P2    p2

                hit               hit          hit                 hit   hit
OPT
   The optimal policy selects that page for replacement for
    which the time to the next reference is longest.
   This algorithm result is fewest number of page faults.


time   1    2    3     4    5     6    7     8     9      10   11     12
page P2     p3   p2    p1   p5   p2    p4   p5     p3     p2   p5     p2

       p2   p2   P2    P2   P2   P2    P4   P4      P4    P2    P2    P2

            p3   p3    p3   P3   P3    P3   P3      P3    P3    P3    P3
                                                    p5
                       P1   P5   P5    p5   P5            P5    P5    P5

                 hit             hit         hit    hit         hit   hit
ADVANTAGES OF VIRTUAL MEMORY
 Allows processes whose aggregate memory requirement
  is greater than the amount of physical memory, as
  infrequently used pages can reside on the disk.
 Virtual memory allows speed gain when only a particular
  segment of the program is required for the execution of
  the program.
 This concept is very helpful in implementing
  multiprogramming environment.
DISADVANTAGES OF VIRTUAL MEMORY
 Applications run slower if the system is using virtual
  memory.
 It Takes more time to switch between applications.

 Less hard drive space for your use.

 It reduces system stability.
Virtual Memory Explained

More Related Content

What's hot

What's hot (20)

Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
Paging and segmentation
Paging and segmentationPaging and segmentation
Paging and segmentation
 
Cache memory
Cache memoryCache memory
Cache memory
 
Disk structure
Disk structureDisk structure
Disk structure
 
Von Neumann Architecture
Von Neumann ArchitectureVon Neumann Architecture
Von Neumann Architecture
 
Cache memory
Cache memoryCache memory
Cache memory
 
Memory management
Memory managementMemory management
Memory management
 
Computer architecture cache memory
Computer architecture cache memoryComputer architecture cache memory
Computer architecture cache memory
 
RAID LEVELS
RAID LEVELSRAID LEVELS
RAID LEVELS
 
Computer system bus
Computer system busComputer system bus
Computer system bus
 
Memory Hierarchy
Memory HierarchyMemory Hierarchy
Memory Hierarchy
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithms
 
File Management in Operating System
File Management in Operating SystemFile Management in Operating System
File Management in Operating System
 
Parallel processing
Parallel processingParallel processing
Parallel processing
 
Virtual memory presentation
Virtual memory presentationVirtual memory presentation
Virtual memory presentation
 
Memory Organization
Memory OrganizationMemory Organization
Memory Organization
 
Von Neumann Architecture
Von Neumann ArchitectureVon Neumann Architecture
Von Neumann Architecture
 
Interrupts
InterruptsInterrupts
Interrupts
 
Multiprocessor system
Multiprocessor system Multiprocessor system
Multiprocessor system
 
Modes of transfer
Modes of transferModes of transfer
Modes of transfer
 

Viewers also liked

Paging and Segmentation in Operating System
Paging and Segmentation in Operating SystemPaging and Segmentation in Operating System
Paging and Segmentation in Operating SystemRaj Mohan
 
Virtual Memory and Paging
Virtual Memory and PagingVirtual Memory and Paging
Virtual Memory and PagingEmery Berger
 
Os Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual MemoryOs Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual Memorysgpraju
 
Chapter 9 - Virtual Memory
Chapter 9 - Virtual MemoryChapter 9 - Virtual Memory
Chapter 9 - Virtual MemoryWayne Jones Jnr
 
Operating System-Memory Management
Operating System-Memory ManagementOperating System-Memory Management
Operating System-Memory ManagementAkmal Cikmat
 
8 memory management strategies
8 memory management strategies8 memory management strategies
8 memory management strategiesDr. Loganathan R
 

Viewers also liked (11)

Paging and Segmentation in Operating System
Paging and Segmentation in Operating SystemPaging and Segmentation in Operating System
Paging and Segmentation in Operating System
 
Virtual Memory and Paging
Virtual Memory and PagingVirtual Memory and Paging
Virtual Memory and Paging
 
Os Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual MemoryOs Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual Memory
 
Chapter 9 - Virtual Memory
Chapter 9 - Virtual MemoryChapter 9 - Virtual Memory
Chapter 9 - Virtual Memory
 
Paging
PagingPaging
Paging
 
04 Cache Memory
04  Cache  Memory04  Cache  Memory
04 Cache Memory
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
 
Operating System-Memory Management
Operating System-Memory ManagementOperating System-Memory Management
Operating System-Memory Management
 
8 memory management strategies
8 memory management strategies8 memory management strategies
8 memory management strategies
 
Memory management
Memory managementMemory management
Memory management
 

Similar to Virtual Memory Explained

virtualmemory-111228090333-phpapp02 (1).pdf
virtualmemory-111228090333-phpapp02 (1).pdfvirtualmemory-111228090333-phpapp02 (1).pdf
virtualmemory-111228090333-phpapp02 (1).pdfArchanaPandiyan
 
virtual-memory-130126022841-phpapp01.pdf
virtual-memory-130126022841-phpapp01.pdfvirtual-memory-130126022841-phpapp01.pdf
virtual-memory-130126022841-phpapp01.pdfry54321288
 
Virtual memory ppt
Virtual memory pptVirtual memory ppt
Virtual memory pptRITULDE
 
Live memory forensics
Live memory forensicsLive memory forensics
Live memory forensicsMehedi Hasan
 
Kernel Recipes 2017 - 20 years of Linux Virtual Memory - Andrea Arcangeli
Kernel Recipes 2017 - 20 years of Linux Virtual Memory - Andrea ArcangeliKernel Recipes 2017 - 20 years of Linux Virtual Memory - Andrea Arcangeli
Kernel Recipes 2017 - 20 years of Linux Virtual Memory - Andrea ArcangeliAnne Nicolas
 
Virtual Memory in Windows
Virtual Memory in Windows Virtual Memory in Windows
Virtual Memory in Windows HanzlaRafique
 
Symmetrix local replication
Symmetrix local replicationSymmetrix local replication
Symmetrix local replicationSundeep Rao
 
Computer architecture ppt
Computer architecture pptComputer architecture ppt
Computer architecture pptShishu
 
Unit 2chapter 2 memory mgmt complete
Unit 2chapter 2  memory mgmt completeUnit 2chapter 2  memory mgmt complete
Unit 2chapter 2 memory mgmt completeKalai Selvi
 
The Forefront of the Development for NVDIMM on Linux Kernel
The Forefront of the Development for NVDIMM on Linux KernelThe Forefront of the Development for NVDIMM on Linux Kernel
The Forefront of the Development for NVDIMM on Linux KernelYasunori Goto
 
Flash Economics and Lessons learned from operating low latency platforms at h...
Flash Economics and Lessons learned from operating low latency platforms at h...Flash Economics and Lessons learned from operating low latency platforms at h...
Flash Economics and Lessons learned from operating low latency platforms at h...Aerospike, Inc.
 

Similar to Virtual Memory Explained (20)

Virtual memory ppts
Virtual memory pptsVirtual memory ppts
Virtual memory ppts
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
 
virtualmemory-111228090333-phpapp02 (1).pdf
virtualmemory-111228090333-phpapp02 (1).pdfvirtualmemory-111228090333-phpapp02 (1).pdf
virtualmemory-111228090333-phpapp02 (1).pdf
 
VIRTUAL 2.pptx
VIRTUAL  2.pptxVIRTUAL  2.pptx
VIRTUAL 2.pptx
 
virtual-memory-130126022841-phpapp01.pdf
virtual-memory-130126022841-phpapp01.pdfvirtual-memory-130126022841-phpapp01.pdf
virtual-memory-130126022841-phpapp01.pdf
 
Virtual memory ppt
Virtual memory pptVirtual memory ppt
Virtual memory ppt
 
Live memory forensics
Live memory forensicsLive memory forensics
Live memory forensics
 
Kernel Recipes 2017 - 20 years of Linux Virtual Memory - Andrea Arcangeli
Kernel Recipes 2017 - 20 years of Linux Virtual Memory - Andrea ArcangeliKernel Recipes 2017 - 20 years of Linux Virtual Memory - Andrea Arcangeli
Kernel Recipes 2017 - 20 years of Linux Virtual Memory - Andrea Arcangeli
 
Virtual Memory in Windows
Virtual Memory in Windows Virtual Memory in Windows
Virtual Memory in Windows
 
Symmetrix local replication
Symmetrix local replicationSymmetrix local replication
Symmetrix local replication
 
Operating System
Operating SystemOperating System
Operating System
 
Computer architecture ppt
Computer architecture pptComputer architecture ppt
Computer architecture ppt
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
 
Unit 2chapter 2 memory mgmt complete
Unit 2chapter 2  memory mgmt completeUnit 2chapter 2  memory mgmt complete
Unit 2chapter 2 memory mgmt complete
 
Mem mgt
Mem mgtMem mgt
Mem mgt
 
virtual memory
virtual memoryvirtual memory
virtual memory
 
The Forefront of the Development for NVDIMM on Linux Kernel
The Forefront of the Development for NVDIMM on Linux KernelThe Forefront of the Development for NVDIMM on Linux Kernel
The Forefront of the Development for NVDIMM on Linux Kernel
 
Flash Economics and Lessons learned from operating low latency platforms at h...
Flash Economics and Lessons learned from operating low latency platforms at h...Flash Economics and Lessons learned from operating low latency platforms at h...
Flash Economics and Lessons learned from operating low latency platforms at h...
 

More from Punjab College Of Technical Education (10)

Blue brain
Blue brainBlue brain
Blue brain
 
Interrupts
InterruptsInterrupts
Interrupts
 
Intel
IntelIntel
Intel
 
CMS
CMSCMS
CMS
 
Saas (1)
Saas (1)Saas (1)
Saas (1)
 
Database fragmentation
Database fragmentationDatabase fragmentation
Database fragmentation
 
Privatisation
PrivatisationPrivatisation
Privatisation
 
Smart cards
Smart cards Smart cards
Smart cards
 
Microprocessor
MicroprocessorMicroprocessor
Microprocessor
 
Walt disney
Walt disneyWalt disney
Walt disney
 

Recently uploaded

How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxnelietumpap1
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 

Recently uploaded (20)

How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptx
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 

Virtual Memory Explained

  • 1. VIRTUAL MEMORY Present by: - Ravisha Sethi
  • 2. CONTENTS  virtual memory  Needs of virtual memory  Importance of virtual memory  Advantage of virtual memory  Disadvantage of virtual memory  Address space & memory space  Page replacement algorithms  FIFO  LRU  OPT
  • 3. VIRTUAL MEMORY  Virtual memory is a common part of operating system on desktop computers.  The term virtual memory refers to something which appears to be present but actually it is not.  The virtual memory technique allows users to use more memory for a program than the real memory of a computer. present Mapper CPU (1) (3) Page (4) frame + x Logical Not present Page page + x frames Virtual (5) address Page frames Secondary storage
  • 4. NEED OF VIRTUAL MEMORY  Virtual memory is a imaginary memory which we are assuming. If we have a material that exceed your memory at that time we need to use the concept of virtual memory.  virtual memory is temporary memory which is used along with the ram of the system.
  • 5. IMPORTANCE OF VIRTUAL MEMORY  When your computer runs out of physical memory it writes what it needs to remember to the hard disc in a swap file as virtual memory.  If a computer running Windows requires more memory/RAM then there is installed in the system to run a program, etc, it uses a small section of the hard drive for this purpose
  • 6. ADDRESS SPACE AND MEMORY SPACE  Virtual memory is the address used by the programmer and the set of such addresses is called address space.  An address in main memory is called a physical address.  The set of such locations in main memory is called the memory space.  Thus the memory space consist of the actual main memory locations directly addressable for processing.
  • 7. PAGE REPLACEMENT ALGORITHMS  In a computer operating system that uses paging for virtual memory management, page replacement algorithm decide which memory pages to page out. When a page of memory need to be allocated.  FIFO (first in first out)  LRU (Least Recently used)  OPT (Optimal)
  • 8. FIFO First in first out is very easy to implement. The fifo algorithm select the page for replacement that has been in memory the longest time. time 1 2 3 4 5 6 7 8 9 10 11 12 page P2 p3 p2 p1 p5 p2 p4 p5 p3 p2 p5 p2 p2* p2* p2* p2* P5 p5 p5* p5* P3 P3 P3 P3* p3 p3 P3 p3* P2 P2 P2 p2* P2* P5 P5 p4 P1 p1 P1* p4 p4 p4 P4* p2 hit hit hit
  • 9. LRU  The least recently used page replacement algorithm keeps track page uses over a short period of time.  The LRU algorithm can be implemented by associating a counter with every page that is n main memory. time 1 2 3 4 5 6 7 8 9 10 11 12 pag P2 p3 p2 p1 p5 p2 p4 p5 p3 p2 p5 p2 e p2* p2* P2 P2 p2* P2 P2 p2* P3 P3 P3* P3* p3 p3* p3* P5 P5 p5* P5 P5 P5* P5 P5 p4* P1 P1 P1* p4 P4 P2 P2 p2 hit hit hit hit hit
  • 10. OPT  The optimal policy selects that page for replacement for which the time to the next reference is longest.  This algorithm result is fewest number of page faults. time 1 2 3 4 5 6 7 8 9 10 11 12 page P2 p3 p2 p1 p5 p2 p4 p5 p3 p2 p5 p2 p2 p2 P2 P2 P2 P2 P4 P4 P4 P2 P2 P2 p3 p3 p3 P3 P3 P3 P3 P3 P3 P3 P3 p5 P1 P5 P5 p5 P5 P5 P5 P5 hit hit hit hit hit hit
  • 11. ADVANTAGES OF VIRTUAL MEMORY  Allows processes whose aggregate memory requirement is greater than the amount of physical memory, as infrequently used pages can reside on the disk.  Virtual memory allows speed gain when only a particular segment of the program is required for the execution of the program.  This concept is very helpful in implementing multiprogramming environment.
  • 12. DISADVANTAGES OF VIRTUAL MEMORY  Applications run slower if the system is using virtual memory.  It Takes more time to switch between applications.  Less hard drive space for your use.  It reduces system stability.