Memory allocation techniques used inside the processor

Asked By 60 points N/A Posted on -
qa-featured

Which are the various memory allocation techniques used? Why are the used? What is the different between the various methods of memory allocation?

SHARE
Answered By 20 points N/A #186859

Memory allocation techniques used inside the processor

qa-featured

A memory allocation technique is used to provide memory to a specific process that enters into the processor. There are two memory allocation techniques used. They are Contiguous memory allocation and Non-Contiguous memory allocation. In Contiguous Memory Allocation method, each process is assigned a single continuous chunk of the memory. It splits the memory into various parts for allocation. In Non-Contiguous Memory Allocation method, parts of the process are assigned Non-Contiguous chunks of the memory. The parts of the process are in different segments. 

Answered By 590495 points N/A #186860

Memory allocation techniques used inside the processor

qa-featured

Memory allocation is the process of designating chunks of memory on request. The allocator normally accepts memory from the operating system in a small quantity of big chunks in which it must divide up to fulfill the requests for smaller chunks. Any returned chunks should also be made available for reuse.

There are several common methods of performing memory allocation with various strengths and weaknesses and several of them are the following:

  • * First fit
  • * Buddy system
  • * Suballocators

Also, these methods can be used in combination. In the first fit algorithm, the allocator maintains a list of free chunks which is known as the free list. When it receives a request for memory, it scans down the list and looks for the chunk that is big enough to satisfy the request.

If the selected chunk is considerably bigger than what is requested, it is usually divided and the remainder is added to the list as another free block. This algorithm executes quite well because it guarantees that allocations are swift. In a buddy system, it will only allocate chunks with specific sizes and has lots of free lists, one for every allowed size.

When a request for memory is received by the allocator, it rounds the requested size up to an allowable size and returns the first block from that size’s free list.

Related Questions