203k views
0 votes
Most systems allow a program to allocate more memory to its address space during execution. Allocation of data in the heap segments of programs is and example of such allocated memory. What is required to support dynamic memor allocation in the following schemes?

a. Contiguous memory allocation

b. Pure segmentation

c. Pure paging

User Firuzeh
by
8.2k points

1 Answer

4 votes

Final answer:

The correct answer is option (a) Contiguous memory allocation, (b) Pure segmentation, and (c) Pure paging.

Step-by-step explanation:

The question deals with dynamic memory allocation requirements for contiguous memory allocation, pure segmentation, and pure paging. Each allocation scheme necessitates different system mechanisms, including algorithms for contiguous allocation, segment tables for segmentation, and page tables for paging. These memory allocation schemes each require different mechanisms to support dynamic memory allocation:

  • Contiguous memory allocation: This requires a mechanism to find a contiguous block of free memory large enough for the requested allocation. An algorithm like 'first-fit', 'best-fit', or 'worst-fit' may be used to find this space.
  • Pure segmentation: Segmentation allows programs to use memory in segments, which can grow or shrink in size. A segment table is used to keep track of these segments, requiring dynamic management to map and allocate the segments properly.
  • Pure paging: Paging involves dividing memory into fixed-size blocks and managing these blocks with a page table. The operating system handles the allocation and mapping of these pages to support dynamic memory allocation within the program's virtual address space.

Regardless of the method used, the operating system must have the capability to allocate and deallocate memory regions on demand and to handle the fragmentation that may occur as a result of dynamic memory allocation.

User Mario Mueller
by
8.1k points