How do main memory and virtual memory solve memory management issues?

 

Memory management algorithms vary from very basic to paging and segmentation strategies.  Modern computer systems operations depend on memory management to function correctly.  Memory space utilization uses dynamic loading to obtain better memory management, this is when a routine is not loaded until it is called.  Main memory also uses swapping, memory protection, memory allocation, segmentation, and paging to solve memory management issues.

      Swapping – a process can be swapped out of memory and put back in storage and then brought back which allows for processes to exceed the real physical address space of the memory in the system.

      Memory Protection – to prevent a process from accessing memory that it does not own

      Can use limit register together with a relocation register to prevent unauthorized access.

      Allocating memory – accomplished by dividing memory into several fixed-sized partitions.

      Each partition may only contain one process which makes the degree of multiprogramming partition dependent.

      Segmentation – memory management scheme that supports programmer view of memory.

      Logical address space is a collection of segments.

      Paging – alternate memory management system

      Avoids external fragmentation and the need for compaction.

      Allows for the sharing of common code.

Virtual memory allows secondary memory to be addressed as though it were part of the main memory (Geeks for Geeks 2023).  It is a technique that is implemented using both hardware and software.  It can map memory addresses used by a program, called virtual address, into physical address in a computer memory. 

Some of the advantages of virtual memory are:

·        - More processes may be maintained in the main memory.

·         -A process may be larger than all of the main memory.

·         -Allows greater multiprogramming levels by using less of the primary memory.

·         -Has twice the capacity for address as main memory.

·         -Increases speed.

·         -Memory isolation has increased security.

Comments