In: Computer Science
Assume there is a 30-byte heap. The free list for this heap has two elements on it. One entry describes the first 10-byte free segment (bytes 0-9), and one entry describes the other free segment (bytes 20-29).
Now assume we have a request for just a single byte of memory. In this case, the allocator will perform an action known as __________ to find a free chunk of memory that can satisfy the request.
|
splitting |
||
|
coalescing |
||
|
chopping |
||
|
relocating |
Refer to the previous question.
After the action is completed, how many elements are there on the free list?
|
3 |
||
|
4 |
||
|
2 |
||
|
1 |
__________ is a strategy for managing free space which results in the smallest leftover hole in memory.
|
Best fit |
||
|
Next fit |
||
|
First fit |
||
|
Worst fit |
__________ is a strategy for managing free space which results in the largest leftover hole in memory.
|
Next fit |
||
|
Best fit |
||
|
Worst fit |
||
|
First fit |
Please find the answer filled indash:
Assume there is a 30-byte heap. The free list for this heap has two elements on it. One entry describes the first 10-byte free segment (bytes 0-9), and one entry describes the other free segment (bytes 20-29).
Now assume we have a request for just a single byte of memory. In this case, the allocator will perform an action known as ____splitting______ to find a free chunk of memory that can satisfy the request.
|
splitting |
||
|
coalescing |
||
|
chopping |
||
|
relocating |
Refer to the previous question.
After the action is completed, how many elements are there on the free list?
|
3 |
||
|
4 |
||
|
2 |
||
|
1 |
Answer: There are 2 elements in the free list. One would be from 0-9 bytes and second would be from 20-29 bytes
____Best fit______ is a strategy for managing free space which results in the smallest leftover hole in memory.
|
Best fit |
||
|
Next fit |
||
|
First fit |
||
|
Worst fit |
___Worst fit_______ is a strategy for managing free space which results in the largest leftover hole in memory.
|
Next fit |
||
|
Best fit |
||
|
Worst fit |
||
|
First fit |