Question: Write a program that implements the Buddy System algorithm for memory management. For input the program accepts 1) the amount of total available memory and
Write a program that implements the Buddy System algorithm for memory management. For input the program accepts 1) the amount of total available memory and 2) the sequence of integers with allocation (+) or return (-) requests. As output, the program must print the table showing the state of the memory (in the same way it is demonstrated in Lecture 6 after each allocation or return. Test the program with the following input parameters: Two megabytes of available memory and the following sequence: (A: +20K), (B: +35K), (C: +90K), (D: +40K), (E: +240K), (D: -40K), (A: -20K), (C: -90K), (B: -35K), (E: -240K). Turn in the listing of the program and the printout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
