1.) Virtual Memory of Linux.
Linux virtual memory incorporates a demand-paging model, which means that content is loaded
into memory only when necessary. It uses a page table for virtual address translation to physical
memory locations. Also, it allows for memory over-commitment where processes can ask for
more physical memory than what is available and this is handled by swapping. Swapping ensures
that physical memory is reclaimed by saving data that is not in use in physical memory, to the
disk.
Virtual Memory of Windows.
Windows virtual memory implements a linear progression mechanism with a multi-tiered
memory manager. It uses a paging file (or swap file) in which information that cannot fit into the
physical memory is stored for temporary access. Windows uses a concept of ‘working set’ which
refers to the amount of memory that the processes are using at that time, and manages system
performance with the help of the Least Recently Used (LRU) algorithm among others.
References:
2. a. Between Linux and Windows virtual memory, which is less complex and why?
Linux is quite often less complex because maintaining a kernel and memory management is
building blocks; it is easy to modify the existing source code. Windows, on the other hand, is
designed with so many layers to give a friendly user interface and security.
b. Similarities between Linux and Windows virtual memory:
- The use of demand paging is common in the two cases.
- A swap file or partition is also present for both systems to deal with memory overcommitment.
- Address resolution from virtual to physical entails the use of page tables in either case.
- Management of memory resources for the two systems include the use of LRU type algorithms.
c. Possible drawbacks of not implementing virtual memory:
- Lacking the ability to perform many operations at once.
- Higher chances of applications freezing because of lack of sufficient memory.
d. Would you incorporate virtual memory into your design?
Yes since virtual memory optimizes the performance of the system, allows for multiple me use
and better management of memory since systems can address more memory than is physically
installed. It further separates processes enhancing security and stability.