[go: up one dir, main page]

0% found this document useful (0 votes)
48 views3 pages

U 4 Topic 12 Virtual Memory

Virtual memory is a technique that allows programmers to access more memory than is physically available in the computer. It works by transferring data between physical memory and a storage device like a hard disk. There are two primary methods for implementing virtual memory - paging and segmentation. Paging divides memory into fixed-size pages that are allocated instead of one large block, while segmentation partitions memory into variable-sized logical units called segments.

Uploaded by

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

U 4 Topic 12 Virtual Memory

Virtual memory is a technique that allows programmers to access more memory than is physically available in the computer. It works by transferring data between physical memory and a storage device like a hard disk. There are two primary methods for implementing virtual memory - paging and segmentation. Paging divides memory into fixed-size pages that are allocated instead of one large block, while segmentation partitions memory into variable-sized logical units called segments.

Uploaded by

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

What is Virtual Memory?

Virtual memory is the partition of logical memory from physical memory.


This partition supports large virtual memory for programmers when only
limited physical memory is available.

Virtual memory can give programmers the deception that they have a
very high memory although the computer has a small main memory. It
creates the function of programming easier because the programmer no
longer requires to worry about the multiple physical memory available.

Virtual memory works similarly, but at one level up in the memory


hierarchy. A memory management unit (MMU) transfers data between
physical memory and some gradual storage device, generally a disk. This
storage area can be defined as a swap disk or swap file, based on its
execution. Retrieving data from physical memory is much faster than
accessing data from the swap disk.
There are two primary methods for implementing virtual memory are as
follows −

 Paging
Paging is a technique of memory management where small fixed-length
pages are allocated instead of a single large variable-length contiguous
block in the case of the dynamic allocation technique. In a paged system,
each process is divided into several fixed-size ‘chunks’ called pages,
typically 4k bytes in length. The memory space is also divided into blocks
of the equal size known as frames.

Advantages of Paging

There are the following advantages of Paging are −

 In Paging, there is no requirement for external fragmentation.


 In Paging, the swapping among equal-size pages and page frames is clear.
 Paging is a simple approach that it can use for memory management.

Disadvantage of Paging

There are the following disadvantages of Paging are −

 In Paging, there can be a chance of Internal Fragmentation.


 In Paging, the page table employs more memory.
 Because of Multi-level Paging, there can be a chance of memory reference overhead.
 Segmentation

The partition of memory into logical units called segments, according to


the user’s perspective is called segmentation. Segmentation allows each
segment to grow independently, and share. In other words, segmentation
is a technique that partition memory into logically related units called a
segment. It means that the program is a collection of the segment.

Unlike pages, segments can vary in size. This requires the MMU to
manage segmented memory somewhat differently than it would manage
paged memory. A segmented MMU contains a segment table to maintain
track of the segments resident in memory.

A segment can initiate at one of several addresses and can be of any


size, each segment table entry should contain the start address and
segment size. Some system allows a segment to start at any address,
while other limits the start address. One such limit is found in the Intel
X86 architecture, which requires a segment to start at an address that
has 6000 as its four low-order bits.

You might also like