Professional Documents
Culture Documents
Report
Report
Introduction.
In this presentation we the last group are going to present on virtual memory. First of all, we are
going to define the virtual memory then we are going to talk on following sub topics (importance
of virtual memory, working, demand paging, page replacement algorithm.)
Definition.
Virtual memory is a section of volatile memory created temporarily on the storage drive. It is
created when a computer is running many processes at once and RAM is running low.
One important use of virtual memory is multitasking. When a computer user opens multiple
programs at once, the data for these programs must be stored in memory for quick access. The
more programs are open, the more memory is needed. When the computer's physical memory is
full, the excess data is stored in virtual memory.
Data Security
Another important issue is data security. In general, a program can guess another program’s
physical address and gain access to sensitive and secret data.
If an OS uses the virtual memory technique, even if some programs have to access the same
address, they all have different mappings. This ensures that they will access different addresses
in the RAM or the disk. This is how virtual memory enables data security.
It also provides position independence to the data. We can store data at any position in the main
memory.
Large Programs
In addition to multitasking, virtual memory allows programmers to create larger and more
complex applications. When these programs are running, they occupy physical memory as well
as virtual memory.
Flexibility
If computers only relied on memory chips, far less memory would be available and the
usefulness of many software programs would be severely limited. Even though virtual memory is
slower, it is still useful because it greatly expands a computer's functionality.
Working.
Virtual memory uses both the computer's software and hardware to work. It transfers processes
between the computer's RAM and hard disk by copying any files from the computer's RAM that
aren't currently in use and moving them to the hard disk. By moving unused files to the hard
disk, a computer frees up space in its RAM to perform current tasks, such as opening a new
application. If the computer later needs to use its RAM for a more urgent task, it can again swap
files to make the most of the available RAM.
RAM is a limited resource stored on chips that are built into the computer's CPU. Installing more
RAM chips can be expensive, so virtual memory allows the computer to move files between
systems as needed to optimize its use of the available RAM.
Demand paging.
Demand paging is a technique used in virtual memory systems where the pages are brought in
the main memory only when required or demanded by the CPU. Hence, it is also named as lazy
swapper because the swapping of pages is done only when required by the CPU.
Example.
Consider page reference string 1, 3, 0, 3, 5, 6, 3 with 3 page frames.Find the number of page
faults.
In an op
Conclusion.
Virtual memory is a part of the system's secondary memory that acts and gives us an
illusion of being the main memory. When your computer's physical memory is full,
virtual memory is required.
Virtual memory works mainly by transferring processes between the computer's RAM
and hard disk depending on the requirements. A Memory Management unit (MMU)
facilitates this purpose.
Page tables are used to record the mapping between virtual and physical memory.
A demand paging mechanism is similar to a paging system with swapping in that
processes and pages are loaded only on demand, rather than in preparation.
When there isn't enough space in the main memory to store the applications, certain
applications can be swapped out of the RAM to the hard disk.
When a certain application needs to be run and is in the hard disk currently, it can be
swapped into the RAM.
It increases the degree of multiprogramming, effective CPU Usage, effective memory
that can be used and eases data sharing without the need for relocation.
Virtual Memory can make a system slower, reducing hard disk space and system
stability.