Allocation techniques, Operating System

Since most of the programs require a lot of memory allocation/deallocation, we expect the memory management to be fast, to have low fragmentation, make good use of locality, and be scalable to multiple processors. Newer issues include security from attacks (e.g. use randomization of locations to minimize effect of buffer-over?ow attacks) as well as reliability in the face of errors (e.g. detecting double free()'s and buffer overruns).

In analyzing the speed of an allocator, the key components are the cost of malloc, the cost of free, and the cost of getting the size of an object (for realloc). In certain types of programs, for instance those with a lot of graphics manipulation, allocators can become the performance bottleneck, and so speed is important.

We say that fragmentation occurs when the heap, due to characteristics of the allocation algorithm, gets "broken up" into several unusable spaces, or when the overall utilization of the memory is compromised. External fragmentation happens when there is waste of space outside (i.e. in between) allocated objects; internal fragmentation happens when there is waste of space inside an allocated area.

Remember that the allocator might at any single time have several pages with unused space, from which it could draw pieces of memory to give to requesting programs. There are several ways to decide what are the good spots, among those with free memory, from which to take memory. The ?rst-?t method ?nds the ?rst chunk of desired size and returns it; it is generally considered to be very fast; best-?t ?nds the chunk that wastes the least of space; and worst-?t takes memory from the largest existent spot, and as a consequence maximizes the free space available. As a general rule, ?rst-?t is faster, but increases fragmentation. One useful technique that can be applied with these methods is always to coalesce free adjacent objects into one big free object.

Posted Date: 3/12/2013 6:05:35 AM | Location : United States







Related Discussions:- Allocation techniques, Assignment Help, Ask Question on Allocation techniques, Get Answer, Expert's Help, Allocation techniques Discussions

Write discussion on Allocation techniques
Your posts are moderated
Related Questions
What are race conditions? Race conditions are problems that take place due to the sharing of the same file by several processes. In such a case none of the processes is able to

The following is a dump of a TCP header in hexadecimal format: 00CD0018 00000EF1 00000D5D 502200D1 01BF0010 We need to first split the above hex as such 00 CD 00 18 00 00

What makes a Just-in-Time inventory system differ from a traditional inventory system?

Single level directory: This is the easiest directory structure. All the files are controlled in the same directory, which is simple to support and understand. Few of the li

Q.  You have devised a fresh page-replacement algorithm that you think may be optimal. In a few contorted test cases Belady's anomaly occurs. Is the fresh algorithm optimal? Descr

Consider the following snapshot of a system, answer the following questions using the banker's algorithm: 1. What is the content of the matrix Need? Is the system in a safe stat

Define caching. A cache is a region of fast memory that holds copies of data. Access to the cached copy is well-organized than access to the original. Caching and buffering are

Q. Illustrate the function of Loader? A loader is a routine which loads an object program and prepares it for execution. There are many loading schemes: relocating, absolute an

What are kernels and what do kernels do? The kernel is a program that comprises the central core of a computer operating   system. It has entire control over everything that

Direct memory access Many computers avoid burdening the main CPU with programmed I/O by offloading sine if this work to a special-purpose processor known as a direct memory add