Memory Management Essay

789 Words2 Pages

Memory management is basically the functionality of computer which runs main memory. It keeps track of each and every memory location either it is allocated to some process or it is free. It checks how much memory is to be allocated to processes. It decides which process will get memory at what time. It tracks whenever some memory gets freed or unallocated and correspondingly it updates the status. SWAPPING Problem: Mono programming is not really of any benefit to us now days. We need to be able to run multiple processes on our machines and one technique of making this happen was by the fixed partitions method. In this method memory is divided into fixed partitions and different jobs/processes are placed on a queue. The job that is in front of the queue is then loaded into the memory and when that job is completed the next one takes its place and so on. When a job is loaded into the memory it stays in the memory until it is completed and once it is completed then it is removed. This method works just fine as long as there is enough memory to hold all the processes. The problem occurs when you run out of memory to hold all these processes, mentioned below is a solution to this problem it is 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. Swapping takes place in the following manner: • The process to be executed should be present in the memory. Since the process can outweigh the memory the process is temporarily swapped out to the disk. • A quantum is set and allocated to the various processes by the CPU. • When that quantum expires a process that is finished is swapped out by the memory m... ... middle of paper ... ...s the CPU which memory is free and which is in use when it has to decide where to allocate which process. The important thing with bitmaps is to decide upon the size of the allocation unit. By choosing a larger allocation unit we risk wasting memory as all the space allocated may not be used. If we choose a smaller allocation unit the bitmap would need to be larger. A problem that arises when using bitmaps is when memory needs to be allocated to a process. For example the allocation size is of 4 bytes and a process comes in and request 256 bytes then we need to look on the bitmap for 64 consecutive free slots (i.e. zeros). As this is very time consuming that is why bit maps are not really used. Another way of representing memory is by using linked lists. If a linked list was used to represent the memory represented by the bit map earlier on it would be as follows.

More about Memory Management Essay

Open Document