What are the three major activities of an operating system in regard to memory management
The three major activities of an operating system in regard to memory management are:
-
Memory Allocation and Deallocation:
- The operating system is responsible for allocating memory to processes when they need it and deallocating memory when it is no longer needed. This involves tracking which parts of memory are in use by which processes and managing the available memory efficiently to ensure optimal performance.
-
Memory Protection:
- The operating system ensures that each process is protected from accessing the memory space of other processes. This prevents unauthorized access and potential data corruption. Memory protection mechanisms include setting access permissions and using hardware features like memory segmentation and paging to isolate process memory spaces.
-
Memory Swapping and Paging:
- The operating system manages the transfer of data between the main memory (RAM) and secondary storage (disk) to ensure that processes have the necessary data and instructions available when needed. Swapping involves moving entire processes in and out of memory, while paging involves transferring fixed-size blocks of data (pages) between memory and disk. This helps in optimizing the use of available physical memory and ensuring that the system can handle more processes than the physical memory can accommodate at once.