ipl-logo

Essay On Memory Management

811 Words4 Pages

Memory Management. Memory management is the process of controlling and coordinating computer memory, Assigning portions called blocks to various running programs to optimize. This is the functionality of an operating system which manages primary memory. It keeps track of each and every memory location. It also does update whenever some memory gets free or unallocated. Memory management has two schemes. 1. Single user case - mono programming 2. Multi user case - multi programming Memory management Requirements. 1.Relocation. 2.Sharing. 3.Protection. 4.Logical Organization. 5.Physical Organization. Relocation. Relocation is a basic requirement of memory management. Relocation during loading does not solve the protection problems Sharing. Any protection mechanism must have the flexibility to allow …show more content…

Manual memory management Manual memory management is where the programmer has direct control over when memory may be recycled. Usually this is either by explicit calls to heap management functions by language constructs that affect the control stack (such as local variables). The disadvantages of manual memory management are: • the programmer must write a lot of code to do repetitive bookkeeping of memory; • memory management must form a significant part of any module interface; • manual memory management typically requires more memory overhead per object; • memory management bugs are common. 2. Automatic memory management Automatic memory management is a service, either as a part of the language or as an extension, that automatically recycles memory that a program would not otherwise use again. Automatic memory managers (often known as garbage collectors, or simply collectors) usually do their job by recycling blocks that are unreachable from the program variables (that is, blocks that cannot be reached by following pointers). The disadvantages of automatic memory management are: • memory may be retained because it is reachable, but won’t be used

Open Document