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 the requirements to be satisfied by the critical section problem? Following are the necessities to be satisfied by the critical section problem: a)      Mutual exc

Transparency Users must be able to access remote resources as though these resources were local. Transparency should as well promote user mobility. Users must be allowed

What is an acyclic graph? A tree that has been corrupted by links to other branches, but does not have any cyclic paths in it.

Write a short note on disk scheduling   One of the responsibities of operating system O/S is to use the hardware efficiently. Whenever a process requires I/O to or from the

What is a process? A process is a program in implementation. It is an active entity and it contains the process stack, having temporary data and the data section includes globa

Q. Presume an operating system maps user-level threads to the kernel using the many-to-many model and the mapping is done through LWPs. Additionally the system allows developers to

Explain root partition The root partition,which have the operating-system kernel and potentially other system files, is mounted at boot time. In successful mount operation, ope

What is banker's algorithm? Banker's algorithm is a deadlock avoidance algorithm that is applicable to a resource-allocation system with multiple examples of each resource type

Modern networks are not implemented as a single piece of software; that would render the task of dealing with multiple technologies and manufacturers virtually impossible. The solu

What are threads? A thread - sometimes called as an implementation context or a lightweight process - is a single sequential flow of control within a program. We use threads