-
Essay / Chapter 8: Memory Management - 1442
In the previous chapter, we discussed deadlocks, resource allocation charts, and deadlock handling strategies. Deadlock is a situation in which some processes wait indefinitely for the actions of others, which occurs during process synchronization. Operating systems use resource allocation policies to prevent and avoid deadlocks. In this chapter, we will discuss different memory management techniques such as main memory, swapping, memory allocation, paging, and segmentation. (1) Objectives In this chapter, the student: 1. Explain what memory management is and why it is important.2. Be able to identify different memory management schemes and the processes they use to manage memory. (1) Basic Concepts Operating systems manage computer memory by accomplishing two tasks. In the first task, each process must have enough memory to run. Once the process is executed, it must not invade the memory space of another process. This task requires that the operating system has set memory limits. In the second task, the different types of memory in the system must be used correctly so that each process can run efficiently. When applications are loaded into memory, they are loaded in block sizes determined by the operating system. For example, if the block size is 2 kilobytes (KB), each process loaded into memory will receive a memory block of size 2 KB. Applications are also loaded in these fixed block sizes, with blocks starting and ending on established boundaries. These blocks and boundaries ensure that applications are not loaded on top of each other in memory space. However, most of the information an application stores in memory is not used at any time. ....sm to control memory access rights on a computer and its purpose is to prevent a process from accessing memory that has not been allocated to it. All memory allocated to a process must be protected to guard against interference from other processes. This is not achieved by software, but by the implementation of computer architecture support: registers linked to memory and memory protection keys associated with memory areas. Memory related registers are implemented using Lower Limit Register (LBR) and Upper Limit Register (UBR) in the CPU. These registers contain the start and end addresses of the memory area allocated to a process. These registers are stored in the Memory Protection Information (MPI) field of the Program Status Word (PSW), which is an internal CPU register indicating the state of the computer at any given time..