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
1. What must a kernel provide for an effective user-level thread implementation? 2. With respect to the quantum q in a scheduling algorithm, explain and discuss the impact of th

In a multiprogramming and time-sharing environment, several users share the system simultaneously. This situation can result in various security problems. a

What is ERD? Entity Relationship Diagram is the graphical representation of the object relationship pair. It is mostly used in database applications.

Explain the Real Time Operating System A real-time operating system comprises definite, fixed time constraints. Processing should be done in the defined constraints, or the sys

WHAT IS OPERATING SYSTEM ?ENLIST AND EXPLAIN BASIC SERVICES PROVIDE BY OS

Processes and Programs Process is a dynamic entity which is a program in execution. A process is a sequence of information executions. Process exists in a limited span of t

What is logical address space and physical address space? The set of all logical addresses formed by a program is known as a logical address space; the set of all physical addr

What do you mean by first fit? First fit allocates the first hole that is big sufficient .Searching can either start at the starting of the set of holes or where the previous f

Q. How is the NTFS namespace planned? Explain. Answer: The NTFS namespace is prearranged as a hierarchy of directories where every directory uses a B+ tree data structure to

How is memory management done using linked lists?   Each one node of the l list will have 4 fields as follows 1-this tells whether it s a hole or a process 2-starting ad