Allocation techniques, Operating System

Assignment Help:

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.


Related Discussions:- Allocation techniques

Relationship among the capabilities of domain level j and i, Q. In a ring-...

Q. In a ring-protection system the level 0 has the greatest access to objects and level n (greater than zero) has fewer access rights. The access rights of a program at a partic

What is a sequential file, What is a sequential file? A file that is re...

What is a sequential file? A file that is read one record or block or parameter at a time in order, based on a tape model of a file.

Designing issues in a network-scalability, Scalability Scalability is t...

Scalability Scalability is the ability of the system to adapt to increased service load. A scalable system will respond more gracefully to increased load than a non scalable on

Define logical address and physical address, Define logical address and phy...

Define logical address and physical address. An address formed by the CPU is referred as logical address. An address seen by the memory unit that is the single loaded into the

All the explanations of operating system and its types., operating systems ...

operating systems and its types together with its design issues and their examples.

What is critical section?, What is critical section? Every process has ...

What is critical section? Every process has a segment code called the critical section, in which the process may be updating tables, changing variables, writing file and etc. W

Programable clock modes in computer systems, Ask question #Minimuexplain th...

Ask question #Minimuexplain the programable clock modes in a computer system m 100 words accepted#

Explain inverted page table, Inverted page table In page table the page...

Inverted page table In page table the page table has one entry for every page that the process is using. The operating system must translate this reference into a physical memo

What are two probable uses of these multiple modes, Q. Several CPUs provide...

Q. Several CPUs provide for more than two modes of operation. What are two probable uses of these multiple modes? Answer: Although most systems merely distinguish between use

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd