Present by :-
Ritul De
CONTENTS
 Introduction
 Advantages of Virtual Memory
 Disadvantage ofVirtual Memory
 FIFO
 LRU
 Page Replacement Algorithms
 OPT
Introduction
 Virtual memory is a separation of user logical memory from physical
memory.
 In this method, we keep only a part of the process in the memory and other
part on the disk (secondary storage)
 Only part of the program needs to be in memory for execution.
 Logical address space is much larger than physical address space.
 Need to allow pages to be swapped in and out.
 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.
 Applications run slower if the system is using virtual memory.
 ItTakes more time to switch between applications.
 Less hard drive space for your use.
 It reduces system stability.
 It is the technique used by operating system to decide which
memory pages swap out .
 It is also decided that is memory , how much frames to allocate
to each process.
First In First Out (FIFO) Algorithm
 Very simple to implement
 Oldest page is replaced for replacement
 Performance is not always good
1
2
3
4
2
3
4
1
3
4
1
2
5
1
2
5
3
2
5
3
4
4 1 2 5 3 4
 Page which has not been used for the longest time in main
memory the one which will be selected for replacement.
 It is like optimal page-replacement algorithm looking backwards
in time.
7
0
1
2
0
1
2
0
3
4
0
3
4
0
2
4
3
2
2 4 2 3
 Looks for page in future
 Lowest page fault
 Difficult to implement
7
0
1
2
0
1
7
0
1
2
0
1
2
0
3
2
0
3
2
4
3
2 3 4 0 1 7

Virtual memory ppt

  • 1.
  • 2.
    CONTENTS  Introduction  Advantagesof Virtual Memory  Disadvantage ofVirtual Memory  FIFO  LRU  Page Replacement Algorithms  OPT
  • 3.
    Introduction  Virtual memoryis a separation of user logical memory from physical memory.  In this method, we keep only a part of the process in the memory and other part on the disk (secondary storage)
  • 4.
     Only partof the program needs to be in memory for execution.  Logical address space is much larger than physical address space.  Need to allow pages to be swapped in and out.  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.
  • 5.
     Applications runslower if the system is using virtual memory.  ItTakes more time to switch between applications.  Less hard drive space for your use.  It reduces system stability.
  • 6.
     It isthe technique used by operating system to decide which memory pages swap out .  It is also decided that is memory , how much frames to allocate to each process.
  • 7.
    First In FirstOut (FIFO) Algorithm  Very simple to implement  Oldest page is replaced for replacement  Performance is not always good 1 2 3 4 2 3 4 1 3 4 1 2 5 1 2 5 3 2 5 3 4 4 1 2 5 3 4
  • 8.
     Page whichhas not been used for the longest time in main memory the one which will be selected for replacement.  It is like optimal page-replacement algorithm looking backwards in time. 7 0 1 2 0 1 2 0 3 4 0 3 4 0 2 4 3 2 2 4 2 3
  • 9.
     Looks forpage in future  Lowest page fault  Difficult to implement 7 0 1 2 0 1 7 0 1 2 0 1 2 0 3 2 0 3 2 4 3 2 3 4 0 1 7