7. (50 pts) Managing Free Memory with Linked List : write a first fit program to manage free memory using linked list as in Figure 3-6(e). Then test your program using the following memory use pattern by printing out the linked list after each memory use or free event: there are in total 10 memory units, and the memory's use pattern is as follows: A (use 2 units), B (use 3 units), C (use 4 units), D (free 3 units of B), E (use 1 unit), F (free 4 units of C), G (free 2 units of A) and H (use 5 units). 7. (50 pts) Managing Free Memory with Linked List : write a first fit program to manage free memory using linked list as in Figure 3-6(e). Then test your program using the following memory use pattern by printing out the linked list after each memory use or free event there are in total 10 memory units, and the memory's use pattern is as follows: A (use 2 units), B (use 3 units), C (use 4 units), D (free 3 units of B), E (use 1 unit), F (free 4 units of C), G (free 2 units of A) and H (use 3 units). Show how to run it also B 16 24 (a) P105 H531-P 86 +-P1144 11111000 11111111 11001111 11111000 H18 2 +-P 2016 | +-P|26| 3 H|29| 3 | X Hole Starts Length at 18 2 Process (b) Figure 3-6. (a) A part of memory with five processes and three holes. The tick marks show the memory allocation units. The shaded regions (0 in the bitmap) are free. (b) The corresponding bitmap. (c) The same information as a list. Bule 8 16 24 (a) P|0|5 H | 5 | 3| +-P|816 P 144 11111000 111111 11001111 11111000 H 18 2 P 2016 P 26 3 H|29| 3 | Hole Starts Length at 18 2 Process (c) (b) Figure 3-6. (a) A part of memory with five processes and three holes. The tick marks show the memory allocation units. The shaded regions (0 in the bitmap) are free. (b) The corresponding bitmap. (c) The same information as a list