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

How can a user program disturb the normal operation, How can a user program...

How can a user program disturb the normal operation of the system? a) Issuing illegal I/O operation. b) By accessing memory locations within the OS itself. c) Refusing to

Life of a page, Suppose your process starts up, and allocates some memory w...

Suppose your process starts up, and allocates some memory with malloc(). The allocator will then give part of a memory page to your process. The OS then updates the corresponding p

An operating system for a real-time environment, Q. What is the major diffi...

Q. What is the major difficulty that a programmer should overcome in writing an operating system for a real-time environment? Answer: The major difficulty is keeping the oper

Explain the application interaction protocols, Explain the Application Inte...

Explain the Application Interaction Protocols Application interaction protocols are uniquely defined for each program and are used to logically describe the data being passed b

How memory utilization factor shall be computed, How Memory utilization fac...

How Memory utilization factor shall be computed  Memory utilization factor shall be defined as Memory in use/total memory connected

Advantages and disadvantages of thread, OPERATING SYSTEM 1. Describe th...

OPERATING SYSTEM 1. Describe the term operating system. Write down the functions of operating system. 2. Explain Thread? Write down the advantages and disadvantages of threa

What is thrashing, What is thrashing? It is a method in virtual memory...

What is thrashing? It is a method in virtual memory schemes when the processor spends most of its time swapping pages, rather than implementing instructions. This is because o

What is the use of inter process communication, What is the use of inter pr...

What is the use of inter process communication. Inter process communication gives a mechanism to allow the co-operating process to communicate with each other and synchronies t

#title.paging, explain hierarchical,hashed and inverted paging

explain hierarchical,hashed and inverted paging

What is an i/o subsystem, What is an I/O subsystem? The control of devi...

What is an I/O subsystem? The control of devices connected to the computer is a main issue while designing operating systems. Because I/O deices differ widely in their function

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