

MCQOPTIONS
Saved Bookmarks
This section includes 12 Mcqs, each offering curated multiple-choice questions to sharpen your Data Structures and Algorithms knowledge and support exam preparation. Choose a topic below to get started.
1. |
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» B. segmentation fault | |
2. |
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 |
Answer» B. linked list and decreasing addressing order | |
3. |
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. The above code represents what? |
A. | code for first fit |
B. | code for best fit |
C. | code for worst fit |
D. | none of the mentionedView Answer |
Answer» B. code for best fit | |
4. |
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» E. | |
5. |
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 |
Answer» B. linked list and decreasing addressing order | |
6. |
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» E. | |
7. |
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» D. makes a probabilistic guess | |
8. |
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» C. modified version of best fit | |
9. |
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» B. best fit, first fit, worst fit, simple-best fit | |
10. |
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» C. arrays | |
11. |
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» B. new or malloc and garbage collection respectively | |
12. |
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» C. contagious allocations | |