0% found this document useful (0 votes)
21 views12 pages

Virtual Memory

Virtual memory is a technique that allows processes to execute even if they are not completely loaded into physical memory. It separates logical memory from physical memory so that physical memory constraints no longer limit available memory. Processes have virtual addresses that are mapped to physical addresses in memory. Demand paging and demand segmentation are two common implementations of virtual memory that load pages or segments of a process into memory only when needed. Algorithms like FIFO and LRU are used to determine which pages to remove from memory if space is needed. While virtual memory provides more flexibility, it also increases hardware and software complexity compared to systems without it.

Uploaded by

Ravi Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views12 pages

Virtual Memory

Virtual memory is a technique that allows processes to execute even if they are not completely loaded into physical memory. It separates logical memory from physical memory so that physical memory constraints no longer limit available memory. Processes have virtual addresses that are mapped to physical addresses in memory. Demand paging and demand segmentation are two common implementations of virtual memory that load pages or segments of a process into memory only when needed. Algorithms like FIFO and LRU are used to determine which pages to remove from memory if space is needed. While virtual memory provides more flexibility, it also increases hardware and software complexity compared to systems without it.

Uploaded by

Ravi Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 12

PRESENTATION ON

Virtual Memory

INTRODUCTION

In todays world, computers have become an integral and


inseparable part of our lives.

it can be very frustrating or stressful to work with


computers that dont run as fast as we want them to or
they just cannot handle certain processes due to shortage
of system resources

When the limitations of the system resources become a


major barrier in achieving our maximum productivity. This
process of making sure that the operating system uses its
resources most efficiently is called System Optimization. To
facilitate the process of system optimization, the concept of
Virtual Memory was introduced.

VIRTUAL MEMORY .. ?
It is defined as a technique that allows the execution of
processes that may not be completely in memory
(Silberschatz & Galvin). Virtual memory separates logical
memory and physical memory. From this separation, the
amount of available physical memory is no longer a
constraint and less physical memory is needed for each
program
Each process has a virtual address, which is used to map the
process into main memory. The process can access its data
with the virtual address space. On the other hand, the
available range of actual memory is known as the physical
address space. And the addresses available in main memory
are called physical addresses. When executing a process,
the virtual address space must be mapped into a physical
location.

As shown in the figure below, the memory management


systems operation is to translate the virtual address into the
actual physical addresses where the data exists.

Implementation of Virtual Memory


1 Demand Paging
A demand-paging system is a system where the processes
reside in secondary memory (usually a disk). When a process
is to be executed, it is swapped into the
memory. The process is divided into several pages and when
needed, that page is restored back into memory instead of
the whole process.

PAGING HARDWARE

it is seen that when this bit is set to valid, indicates that


the associated page is both legal and in memory. If the bit is
set to invalid, this value indicates that the page is either
not valid or is valid but is currently on the disk. If the process
tries to use a page that was not brought into memory causes
a page-fault trap.

2. DEMAND SEGMENTATION

When hardware can become an issue, a less efficient


way to implement virtual memory is with demand
segmentation. The hardware setup used to implement
demand segmentation is shown in Figure 4.

A LG O RI T H MS US E D
1 First in, first out (FIFO)

Replace the page which has been resident longest.

2 LEAST-RECENTLY-USED (LRU)

In general LRU algorithm performs better than FIFO

It assumes that the page used in the most distant past


is least likely to be referenced in the near future

C O N C LU S I O N
Virtual memory provides the illusion of large address space
that almost eliminates considerations imposed by the limited
capacity of physical memory. Thus, both system and user
programs can provide the desired functionality without
concern for the amount of real memory installed in a particular
system. However, the main disadvantage of virtual memory is
the complex hardware and software needed to support it. Both
the space and time complexities of virtual-memory operating
systems exceed those of their real-memory counterparts.
Large virtual-address space and management of file-map
tables contribute to considerably higher table fragmentation.

u
o
Y
k
n
a
Th

You might also like