Answer to Question #269370 in Java | JSP | JSF for Santosh

Question #269370

Write an algorithm to find the total number of units of memory allocated/deallocated by the server one after processing all the request

1
Expert's answer
2021-11-21T04:51:10-0500

Buddy memory allocation is an algorithm for determining the total amount of units of memory allocated/deallocated by the server after processing all requests:

A list contains all free nodes that are always powers of two.

When an allocation request comes in, start with the smallest block and work your way up to the largest.

If such a block is identified, allocation is completed, and the list is then traversed upwards until a large enough block is found.

Then split the blocks again, one for adding to the next free list and the other for traversing down till we reach the destination.


If no allocations were discovered, just return null.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS