Virtual Memory Is A Technique For Managing Memory That Lets Computers Make Up For A Lack of Physical Memory by Using Secondary Memory
Virtual Memory Is A Technique For Managing Memory That Lets Computers Make Up For A Lack of Physical Memory by Using Secondary Memory
I. PAGING
Paging is a storage mechanism used to retrieve processes from the secondary storage into
the main memory in the form of pages.
The idea behind paging is that the physical memory is divided into fixed-size blocks
called page frames, which are the same size as the pages used by the process. The
process’s logical address space is also divided into fixed-size blocks called pages, which
are the same size as the page frames. When a process requests memory, the operating
system allocates one or more page frames to the process and maps the process’s logical
pages to the physical page frames (Stallings, 2012).
II. SEGMENTATION
Segmentation is a memory administration approach used in operating system that divides
memory into logical multiple sized segments of variable sizes. Each segment represents a
different portion of the program.
In virtual memory segmentation each process is divided into multiple segments and all of
them to not necessarily reside at one point at a time. The information regarding the
segments are stored in segment table that helps in mapping of the two dimensional logical
addresses to physical addresses (Khurana, 2011)
A page fault is an exception raised by the memory management unit that happen if a
program tries to access a piece of memory that does not exist in physical memory (main
memory). The exception usually instructs the machine to find this data block within virtual
memory, that way it can be sent to the physical memory from storage devices (Ramesh,
2010).
A page fault usually happens when a process tries to access memory located in a virtual
address space that it is not authorized to access. When this occurs, the kernel must act in
order for the process to be allowed to continue executing.
i. Use of swapping technique, whereby the operating system retrieves the page from
secondary storage into free frame in RAM
ii. Pre fetching
iii. Demand paging
Kanade, V. (2023, march 31). What Is Virtual Memory? Meaning, Architecture, Benefits and Challenges.
Retrieved from Spiceworks: https://www.spiceworks.com/tech/devops/articles/what-is-virtual-
memory/#:~:text=Virtual%20memory%20is%20defined%20as,multitasking%20capabilities%2C%
20and%20data%20security.
simplilearn. (2023, october 30). Virtual Memory: Everything You Need to Know. Retrieved from
simplilearn: https://www.simplilearn.com/virtual-memory-article
Stallings, w. (2012). In Operating Systems: Internals and Design Principles. Prentice Hall.