SlideShare a Scribd company logo
Operating System 36
Virtual Memory
Prof Neeraj Bhargava
Vaibhav Khanna
Department of Computer Science
School of Engineering and Systems Sciences
Maharshi Dayanand Saraswati University Ajmer
Virtual Memory
• Code needs to be in memory to execute, but entire
program rarely used
– Error code, unusual routines, large data structures
• Entire program code not needed at same time
• Consider ability to execute partially-loaded
program
– Program no longer constrained by limits of physical
memory
– Each program takes less memory while running ->
more programs run at the same time
• Increased CPU utilization and throughput with no increase
in response time or turnaround time
– Less I/O needed to load or swap programs into
memory -> each user program runs faster
Virtual Memory
• Virtual memory is a technique that permits the
execution of processes that may not be completely
resident in the memory.
• The main advantage of this scheme is that programs
can be larger than physical memory.
• Further, it views main memory into an extremely large,
uniform array of storage, separating logical memory as
viewed by the user from physical memory.
• It, as a matter of fact augments the main memory with
secondary storage devices (like hard disks).
• This technique frees programmers from concern over
memory storage limitations.
Background (Cont.)
• Virtual memory – separation of user
logical memory from physical memory
– Only part of the program needs to be in memory
for execution
– Logical address space can therefore be much
larger than physical address space
– Allows address spaces to be shared by several
processes
– Allows for more efficient process creation
– More programs running concurrently
– Less I/O needed to load or swap processes
Background (Cont.)
• Virtual address space – logical view of
how process is stored in memory
– Usually start at address 0, contiguous addresses
until end of space
– Meanwhile, physical memory organized in page
frames
– MMU must map logical to physical
• Virtual memory can be implemented
via:
– Demand paging
– Demand segmentation
Virtual Memory That is Larger Than Physical Memory
Virtual-address Space
 Usually design logical address space for
stack to start at Max logical address and
grow “down” while heap grows “up”
 Maximizes address space use
 Unused address space between
the two is hole
 No physical memory needed
until heap or stack grows to a
given new page
 Enables sparse address spaces with
holes left for growth, dynamically linked
libraries, etc
 System libraries shared via mapping into
virtual address space
 Shared memory by mapping pages read-
write into virtual address space
 Pages can be shared during fork(),
speeding process creation
Shared Library Using Virtual
Memory
Implementation
• Virtual memory makes the task of programming much easier,
because the programmer no longer needs to worry about the
amount of physical memory available, or about what code can be
placed in overlays, but can concentrate instead on the problem to
be programmed.
• On systems, which support virtual memory, overlays have virtually
disappeared, therefore.
• Virtual memory is commonly implemented by Demand Paging.
• It can also be implemented in a segmentation system.
• Several systems provide a paged segmentation scheme, where
segments are broken into pages.
• Thus, the user view is segmentation, but the operating system can
implement this view with demand paging.
Assignment
• Explain the concept and usage of virtual
Memory

More Related Content

PPT
Ch9 Virtual Memory
PDF
OS virtual memory
PPTX
Virtual Memory.pptx
PPT
Virtual Memory
PPT
39 virtual memory
Ch9 Virtual Memory
OS virtual memory
Virtual Memory.pptx
Virtual Memory
39 virtual memory

Similar to Operating system 36 virtual memory (20)

PPT
memory management and Virtual Memory.ppt
PPT
Cache replacement policies,cache miss,writingtechniques
PDF
CSI-503 - 9. Virtual Memory
PPTX
Computer architecture virtual memory
PDF
Operating Systems - memory management
PDF
Virtual memory
PPTX
Virtual memory presentation
PPTX
Memory Management in System Designing.pptx
DOCX
VirutualMemory.docx
PPTX
Virtual Memory
PDF
Memory Management slides of operating system
PPTX
chapter 2 memory and process management
PPTX
Virtual memory
DOCX
Module 4 memory management
PDF
muja osjkkhkhkkhkkkfdxfdfddkhvjlbjljlhgg
PPT
Power Point Presentation on Virtual Memory.ppt
PDF
Virtual Memory - Part1
PPT
Chapter 8 - Virtual memory - William stallings.ppt
PPTX
virtual memory
PDF
Virtual memory 20070222-en
memory management and Virtual Memory.ppt
Cache replacement policies,cache miss,writingtechniques
CSI-503 - 9. Virtual Memory
Computer architecture virtual memory
Operating Systems - memory management
Virtual memory
Virtual memory presentation
Memory Management in System Designing.pptx
VirutualMemory.docx
Virtual Memory
Memory Management slides of operating system
chapter 2 memory and process management
Virtual memory
Module 4 memory management
muja osjkkhkhkkhkkkfdxfdfddkhvjlbjljlhgg
Power Point Presentation on Virtual Memory.ppt
Virtual Memory - Part1
Chapter 8 - Virtual memory - William stallings.ppt
virtual memory
Virtual memory 20070222-en
Ad

More from Vaibhav Khanna (20)

PPTX
Information and network security 47 authentication applications
PPTX
Information and network security 46 digital signature algorithm
PPTX
Information and network security 45 digital signature standard
PPTX
Information and network security 44 direct digital signatures
PPTX
Information and network security 43 digital signatures
PPTX
Information and network security 42 security of message authentication code
PPTX
Information and network security 41 message authentication code
PPTX
Information and network security 40 sha3 secure hash algorithm
PPTX
Information and network security 39 secure hash algorithm
PPTX
Information and network security 38 birthday attacks and security of hash fun...
PPTX
Information and network security 37 hash functions and message authentication
PPTX
Information and network security 35 the chinese remainder theorem
PPTX
Information and network security 34 primality
PPTX
Information and network security 33 rsa algorithm
PPTX
Information and network security 32 principles of public key cryptosystems
PPTX
Information and network security 31 public key cryptography
PPTX
Information and network security 30 random numbers
PPTX
Information and network security 29 international data encryption algorithm
PPTX
Information and network security 28 blowfish
PPTX
Information and network security 27 triple des
Information and network security 47 authentication applications
Information and network security 46 digital signature algorithm
Information and network security 45 digital signature standard
Information and network security 44 direct digital signatures
Information and network security 43 digital signatures
Information and network security 42 security of message authentication code
Information and network security 41 message authentication code
Information and network security 40 sha3 secure hash algorithm
Information and network security 39 secure hash algorithm
Information and network security 38 birthday attacks and security of hash fun...
Information and network security 37 hash functions and message authentication
Information and network security 35 the chinese remainder theorem
Information and network security 34 primality
Information and network security 33 rsa algorithm
Information and network security 32 principles of public key cryptosystems
Information and network security 31 public key cryptography
Information and network security 30 random numbers
Information and network security 29 international data encryption algorithm
Information and network security 28 blowfish
Information and network security 27 triple des
Ad

Recently uploaded (20)

PPTX
ai tools demonstartion for schools and inter college
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
Digital Strategies for Manufacturing Companies
PDF
System and Network Administraation Chapter 3
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
medical staffing services at VALiNTRY
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
Introduction to Artificial Intelligence
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
top salesforce developer skills in 2025.pdf
PDF
System and Network Administration Chapter 2
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
ai tools demonstartion for schools and inter college
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Digital Strategies for Manufacturing Companies
System and Network Administraation Chapter 3
How to Choose the Right IT Partner for Your Business in Malaysia
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Design an Analysis of Algorithms II-SECS-1021-03
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
medical staffing services at VALiNTRY
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Introduction to Artificial Intelligence
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
top salesforce developer skills in 2025.pdf
System and Network Administration Chapter 2
Upgrade and Innovation Strategies for SAP ERP Customers
Wondershare Filmora 15 Crack With Activation Key [2025
Understanding Forklifts - TECH EHS Solution
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
CHAPTER 2 - PM Management and IT Context
Adobe Illustrator 28.6 Crack My Vision of Vector Design

Operating system 36 virtual memory

  • 1. Operating System 36 Virtual Memory Prof Neeraj Bhargava Vaibhav Khanna Department of Computer Science School of Engineering and Systems Sciences Maharshi Dayanand Saraswati University Ajmer
  • 2. Virtual Memory • Code needs to be in memory to execute, but entire program rarely used – Error code, unusual routines, large data structures • Entire program code not needed at same time • Consider ability to execute partially-loaded program – Program no longer constrained by limits of physical memory – Each program takes less memory while running -> more programs run at the same time • Increased CPU utilization and throughput with no increase in response time or turnaround time – Less I/O needed to load or swap programs into memory -> each user program runs faster
  • 3. Virtual Memory • Virtual memory is a technique that permits the execution of processes that may not be completely resident in the memory. • The main advantage of this scheme is that programs can be larger than physical memory. • Further, it views main memory into an extremely large, uniform array of storage, separating logical memory as viewed by the user from physical memory. • It, as a matter of fact augments the main memory with secondary storage devices (like hard disks). • This technique frees programmers from concern over memory storage limitations.
  • 4. Background (Cont.) • Virtual memory – separation of user logical memory from physical memory – Only part of the program needs to be in memory for execution – Logical address space can therefore be much larger than physical address space – Allows address spaces to be shared by several processes – Allows for more efficient process creation – More programs running concurrently – Less I/O needed to load or swap processes
  • 5. Background (Cont.) • Virtual address space – logical view of how process is stored in memory – Usually start at address 0, contiguous addresses until end of space – Meanwhile, physical memory organized in page frames – MMU must map logical to physical • Virtual memory can be implemented via: – Demand paging – Demand segmentation
  • 6. Virtual Memory That is Larger Than Physical Memory
  • 7. Virtual-address Space  Usually design logical address space for stack to start at Max logical address and grow “down” while heap grows “up”  Maximizes address space use  Unused address space between the two is hole  No physical memory needed until heap or stack grows to a given new page  Enables sparse address spaces with holes left for growth, dynamically linked libraries, etc  System libraries shared via mapping into virtual address space  Shared memory by mapping pages read- write into virtual address space  Pages can be shared during fork(), speeding process creation
  • 8. Shared Library Using Virtual Memory
  • 9. Implementation • Virtual memory makes the task of programming much easier, because the programmer no longer needs to worry about the amount of physical memory available, or about what code can be placed in overlays, but can concentrate instead on the problem to be programmed. • On systems, which support virtual memory, overlays have virtually disappeared, therefore. • Virtual memory is commonly implemented by Demand Paging. • It can also be implemented in a segmentation system. • Several systems provide a paged segmentation scheme, where segments are broken into pages. • Thus, the user view is segmentation, but the operating system can implement this view with demand paging.
  • 10. Assignment • Explain the concept and usage of virtual Memory