SlideShare a Scribd company logo
3
Most read
4
Most read
6
Most read
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 ppt

More Related Content

PPS
Virtual memory
PPT
Virtual memory
PPT
Virtual memory
PPTX
Page replacement algorithms
PPT
Virtual memory
PPTX
Virtual Memory
PPTX
Operating Systems: Virtual Memory
PPTX
Virtual memory management in Operating System
Virtual memory
Virtual memory
Virtual memory
Page replacement algorithms
Virtual memory
Virtual Memory
Operating Systems: Virtual Memory
Virtual memory management in Operating System

What's hot (20)

PPTX
Operating Systems: Device Management
PPTX
Process management os concept
PPTX
Direct memory access (dma)
PPTX
Associative memory 14208
PPS
Cache memory
PPTX
PPTX
Process synchronization in Operating Systems
PPTX
Pipeline processing and space time diagram
PPT
Flow oriented modeling
PPTX
ADDRESSING MODES
PPTX
Pipelining and vector processing
PPT
Paging.ppt
PPTX
Direct Memory Access(DMA)
PPTX
Demand paging
PDF
Memory management
PDF
Von Neumann Architecture
PDF
Addressing modes in computer organization
PPT
Disk scheduling
PPTX
register
PPTX
Architecture of operating system
Operating Systems: Device Management
Process management os concept
Direct memory access (dma)
Associative memory 14208
Cache memory
Process synchronization in Operating Systems
Pipeline processing and space time diagram
Flow oriented modeling
ADDRESSING MODES
Pipelining and vector processing
Paging.ppt
Direct Memory Access(DMA)
Demand paging
Memory management
Von Neumann Architecture
Addressing modes in computer organization
Disk scheduling
register
Architecture of operating system
Ad

Viewers also liked (12)

PPTX
Paging and Segmentation in Operating System
PDF
Virtual Memory and Paging
PPTX
Paging and segmentation
PPT
Os Swapping, Paging, Segmentation and Virtual Memory
PPT
Memory management
PPT
Chapter 9 - Virtual Memory
PPT
Paging
PPT
04 Cache Memory
PDF
Virtual memory
PPTX
Operating System-Memory Management
PDF
8 memory management strategies
PPTX
Memory management
Paging and Segmentation in Operating System
Virtual Memory and Paging
Paging and segmentation
Os Swapping, Paging, Segmentation and Virtual Memory
Memory management
Chapter 9 - Virtual Memory
Paging
04 Cache Memory
Virtual memory
Operating System-Memory Management
8 memory management strategies
Memory management
Ad

Similar to Virtual memory ppt (20)

PPT
Virtual memory
PPT
Virtual memory ppts
PDF
virtualmemory-111228090333-phpapp02 (1).pdf
PPTX
Virtual Memory in Windows
PPTX
VIRTUAL 2.pptx
PPTX
Abhaycavirtual memory and the pagehit.pptx
PPTX
Virtual memory, operating system pptx.pptx
PDF
ikh311-06
PPTX
Virtual memory and page replacement algorithm
PPT
NOV11 virtual memory.ppt
PDF
CSI-503 - 9. Virtual Memory
PPT
virtual memory.ppt
PPTX
coafinal1-copy-150430204758-conversion-gate01.pptx
PPTX
TAHREEM KOUSAR Operating System ASSIGNMENT.pptx
DOCX
virtual memory
PPT
Chapter 09 - Virtual Memory.ppt
PPTX
Virtual Memory in Operating System
PPTX
Virtual memory (testing)
PPT
NOV11 virtual memory.ppt
PDF
Virtual memory
Virtual memory
Virtual memory ppts
virtualmemory-111228090333-phpapp02 (1).pdf
Virtual Memory in Windows
VIRTUAL 2.pptx
Abhaycavirtual memory and the pagehit.pptx
Virtual memory, operating system pptx.pptx
ikh311-06
Virtual memory and page replacement algorithm
NOV11 virtual memory.ppt
CSI-503 - 9. Virtual Memory
virtual memory.ppt
coafinal1-copy-150430204758-conversion-gate01.pptx
TAHREEM KOUSAR Operating System ASSIGNMENT.pptx
virtual memory
Chapter 09 - Virtual Memory.ppt
Virtual Memory in Operating System
Virtual memory (testing)
NOV11 virtual memory.ppt
Virtual memory

Recently uploaded (20)

PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
GDM (1) (1).pptx small presentation for students
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Cell Types and Its function , kingdom of life
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
01-Introduction-to-Information-Management.pdf
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
Classroom Observation Tools for Teachers
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
Pharmacology of Heart Failure /Pharmacotherapy of CHF
GDM (1) (1).pptx small presentation for students
2.FourierTransform-ShortQuestionswithAnswers.pdf
Cell Types and Its function , kingdom of life
Abdominal Access Techniques with Prof. Dr. R K Mishra
01-Introduction-to-Information-Management.pdf
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
O7-L3 Supply Chain Operations - ICLT Program
Anesthesia in Laparoscopic Surgery in India
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Classroom Observation Tools for Teachers
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Chinmaya Tiranga quiz Grand Finale.pdf

Virtual memory ppt

  • 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.