Topic > Essay on Memory Management - 789

Memory management is basically the functionality of the computer that runs the main memory. It keeps track of every single memory location that is allocated to some process or free. Controls how much memory should be allocated to processes. It decides which process will get memory and at what time. It keeps track of every time some memory is freed or unallocated and updates the state accordingly. SWAPPING Problem: Mono programming is of no benefit to us nowadays. We need to be able to run multiple processes on our machines, and one technique to make this happen was the fixed partition method. In this method the memory is divided into fixed partitions and several jobs/processes are placed in a queue. The job that is at the front of the queue is then loaded into memory, and when that job completes, the next one takes its place, and so on. When a job is loaded into memory, it remains in memory until it is completed, and once it is completed it is removed. This method works perfectly as long as there is enough memory to hold all processes. The problem occurs when you run out of memory to hold all these processes, mentioned below is a solution to this problem known as swapping. Solution: The above mentioned problem can be solved by keeping the excess processes in the disk and calling them when they are needed. This can be implemented by swapping. The exchange occurs as follows:• The process to be executed must be present in memory. Since the process can exceed memory, the process is temporarily swapped to disk. • A quantum is set and assigned to various processes by the CPU. • When that quantum expires, a process that has terminated is swapped out of memory m. ..... half of the paper ...... is the CPU which has free memory and which is in use when it has to decide where to allocate which process. The important thing with bitmaps is deciding the size of the allocation unit. By choosing a larger allocation unit we risk wasting memory since all the allocated space may not be used. If we choose a smaller allocation unit, the bitmap should be larger. One issue that arises when using bitmaps is when memory needs to be allocated to a process. For example, the allocation size is 4 bytes and a process comes in and requests 256 bytes, so we need to search the bitmap for 64 consecutive free slots (i.e. zeros). Since this is time consuming, this is why bitmaps aren't really used. Another way to represent memory is to use linked lists. If a linked list were used to represent the memory represented by the bitmap above, it would look like this.