Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Classify each of the following statements as true or false: a. When a stack i

ID: 3838919 • Letter: 1

Question

1. Classify each of the following statements as true or false: a. When a stack is used, reuse of a released memory area is automatic. b. PCD data can be allocated on a stack. c. The relocation register helps the kernel perform compaction of programs to avoid external fragmentation. d. Memory allocation performed by using a buddy system allocator does not suffer from internal fragmentation. e. When a memory area is released in a system employing a buddy system allocator, the number of free memory areas increases by 1, decreases by 1, or remains unchanged. f. External fragmentation can occur when either a buddy system allocator or a powerof-2 allocator is used. g. When dynamic linking and loading is employed, a routine that is not used in an execution of a program is not loaded in memory. h. In a paging system, it is not possible to swap in a process into a set of noncontiguous memory area(s) that is different from the set of noncontiguous memory areas from which it was swapped out. i. In a paging system, a programmer has to demarcate the pages in the code and data of a program. j. There would be no need for linkers if all programs were coded as self-relocating programs.

SUNJECT - OPERATION INTERNALS

Explanation / Answer

a. True - As the Stack operates on LIFO, any released memory would be on top. So the reuse of memory is automatic.

b. False - The PCD data and the stack share a single large area of memory but grow in opposite directions when memory is allocated to new data.

c. True - Relocation register permits the kernal to change the memory area allocated to a program during the program's execution.

d. False - Memory wasted because the memory requested is a little larger than a small block, but a lot smaller than a large block. Because of the way the buddy memory allocation technique works, a program that requests 66K of memory would be allocated 128K, which results in a waste of 62K of memory.