Virtual Memory
Virtual Memory
2
Operating
System
Course Outcomes • The student will be able to understand
CO Title Level fundamental understanding of
Number
operating systems and its
CO1 Describe the important computer system Understa
functionalities.
resources and the role of operating system nd • The student will be able to understand
in their management policies and
algorithms. the process management, various
CO2 Understand the process management Rememb scheduling algorithms, concurrency
policies and scheduling of processes by
CPU and familiar with memory
er and synchronization.
management and its allocation policies. • The student will be able to understand
memory management and virtual
CO3 Identify use and evaluate the storage Apply
management policies with respect to memory concepts in modern
different storage management Operating systems
technologies.
3
Virtual Memory
Background
• 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
– Program and programs could be larger than physical memory
Background
• 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
….
i
i
page table
3. Bring the desired page into the (newly) free frame; update the page and
frame tables
4. Continue the process by restarting the instruction that caused the trap
Note now potentially 2 page transfers for page fault – increasing EAT
Page Replacement
REFERENCES
• “Galvin, Peter B., Silberchatz, A., “Operating System Concepts”, Addison
Wesley, 9th Edition.
• William Stallings, Operating Systems: Internals and Design Principles, 7th
edition Pearson Education Limited, 2014 ISBN: 1292061944,
9781292061948.
• Andrew Tananbaum, “Operating System”, PHI Learning.
• Godbole, Kahate, "Operating System: A Concept Based Approach", Tata
Mc-Graw- Hill.
E-Video Links
• https://www.youtube.com/watch?v=bkSWJJZNgf8&list=PLxCzCOWd7ai
Gz9donHRrE9I3Mwn6XdP8p
• https://www.youtube.com/watch?v=vBURTt97EkA&list=PLBlnK6fEyqRi
VhbXDGLXDk_OQAeuVcp2O
• https://nptel.ac.in/courses/106/108/106108101/
THANK YOU
For queries
Email: [email protected]
28