You are on page 1of 16

Abir Naskar 13MA60R21

Virtual Memory
COMPUTER SCIENCE AND DATA PROCESSING DEPARTMENT OF MATHEMATICS IIT KHARAGPUR

OUTLINE
Why virtual memory? Basic issue. Demand paging. Virtual to physical address mapping. Page fault. Page replacement. Page table entries. References
1

VIRTUAL MEMORY
Extension of main memory. Secondary storage is used.

Combination of hardware and software.


Usually very large. Working set of pages resides in main memory, others are in secondary memory.

WHY VIRTUAL MEMORY


Main memory is expensive.
Main memory size is less. All program are not active.

Multiprogramming environment.
Time sharing. Allow OS to share memory. Protect program from each other.
3

MOTIVATION
We use main memory as a cache of disk memory.
- address space of process can exceed physical memory size.

Simplify memory management.


- only active code and data is actually in memory.

Provide protection.
- one process cant interfere with another.

LEVELS IN MEMORY HIERARCHY

SYSTEM WITH PYHSICAL MEMORY ONLY

SYSTEM WITH VIRTUAL MEMORY

CACHE MEMORY VIRTUAL MEMORY


VS

ADDRESS MAPPING

PAGE TABLE

PAGE FAULT

PAGE REPLACEMENT

DISADVANTAGES

Applications run slower. It takes more time to switch between applications.

Less hard drive space for your use.

REFERENCES
Stallings W. Operating Systems: Internals and Design Principles (7th Edition). prentice hall, 2010.

Thank you

You might also like