Free List | Data Structure MCQs


What are the disadvantages in implementing buddy system algorithm for free lists?

   A.) internal fragmentation
   B.) it takes so much space
   C.) we no more have the hole lists in order of memory address, so it is difficult to detect if 2 holes remain adjacent in memory and shall be merged into one hole
   D.) both a and c are correct

Answer: Option 'D'

Internal fragmentation is an issue to be dealt and it takes so much space.


Accessing free list very frequently for wide range of addresses can lead to

   A.) paging
   B.) segmentation fault
   C.) memory errors
   D.) cache problems

Answer: Option 'A'

Paging in/out of disk will be caused.


What is buddy memory management of free lists?

   A.) modified version of first fit
   B.) buddy allocation keeps several free lists, each one holds blocks which are of one particular size
   C.) modified version of best fit
   D.) a tree representation of free lists

Answer: Option 'B'

When an allocation request is received, the list that holds blocks that are just large enough to satisfy the request are considered, and an open location is returned. If no free blocks that are smaller than two times the size that are requested are available, a larger block is split in two to satisfy the requirements.


How does implicit free lists(garbage collection) works in adding memory to free list?

   A.) whichever comes last will be added to free list
   B.) whichever comes first will be added to free list
   C.) certain blocks cannot be used if there are no pointers to them and hence they can be freed
   D.) makes a probabilistic guess

Answer: Option 'C'

When no pointers pointing a block that means it is useless to be in memory.


What datastructures can be used in implementing a free list?

   A.) only linked list
   B.) linked list or sort trees
   C.) arrays
   D.) trees

Answer: Option 'B'

Sort trees can also be used in impelementing free lists which remaincomplex.


Free lists are used in

   A.) static memory allocation
   B.) dynamic memory allocation
   C.) contagious allocations
   D.) are used for speeding up linked list operations

Answer: Option 'B'

dynamic memory allocation
Their property is meant for dynamic allocations.


Assume there is a free list which contains nodes and is filled with a value if it is already assigned and the value will be the size of requested block else will be 0.

 z = startpoint;
 while ((z < end) &&    \ didn't reach end
   (*z <= len))          \ too small to satisfy request
   assign this block
The above code represents what ?

   A.) code for first fit
   B.) code for best fit
   C.) code for worst fit
   D.) none of these

Answer: Option 'A'

As z is start point and now from beginning we are moving and checking if we reached end and then checking size naively assigning the first block which is bigger than required size hence it is first fit.


How are free blocks linked together mostly and in what addressing order?

   A.) circular linked list and increasing addressing order
   B.) linked list and decreasing addressing order
   C.) linked list and in no addressing order
   D.) none of these

Answer: Option 'A'

circular linked list and increasing addressing order


What are different ways of implementing free lists ? and which is simple among them?

   A.) best fit, first fit, worst fit , simple-first fit
   B.) best fit, first fit, worst fit , simple-best fit
   C.) best fit, first fit, worst fit , simple-worst fit
   D.) best fit simple-best fit

Answer: Option 'A'

The simplest form of memory management system can be called as first-fit. a device or system maintains a single list of free memory locations. When request to memory is sent, the list is searched and the first block that is large enough is returned.


What are implicit and explicit implementations of freelists?

   A.) garbage collection and new or malloc operators respectively
   B.) new or malloc and garbage collection respectively
   C.) implicit implementation is not favored
   D.) explicit implementation is not favored

Answer: Option 'A'

garbage collection and new or malloc operators respectively
Gc and new most widely known.

Free List | Data Structure MCQs Download Pdf