Data Structure Questions and Answers-Free List

 

 Help authour, Buy PDF Ebook   >>>Click Here<<<

Data Structure Questions and Answers-Free List

Click on any option to know the CORRECT ANSWERS

Question 6
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
Management Questions answers

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

Question 7
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
UPSC GS Questions answers

Question 7 Explanation: 
Internal fragmentation is an issue to be dealt and it takes so much space.

Question 8
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 the mentioned
Journalism Questions answers

Question 8 Explanation: 
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.

Question 9
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 the mentioned
Biology Questions answers

Question 9 Explanation: 
A common way is circular linked list and address are arranged in increasing order because merging would be easier which is actually a problem in buddy memory allocation.

Question 10
Accessing free list very frequently for wide range of addresses can lead to
A
paging
B
segmentation fault
C
memory errors
D
cache problems
Journalism Questions answers

Question 10 Explanation: 
Paging in/out of disk will be caused.

There are 10 questions to complete.

 

 Download all FREE PDF Ebook >>>CLICK HERE<<<