Question:

A process is organised in the memory from bottom to top ordering the following in correct order :
A. stack

B. text

C. data

D. heap

Choose the correct answer from the options given below :

Show Hint

To remember the order from bottom up, use the phrase "The Data Has Stacked." (Text, Data, Heap, Stack). Note that Heap and Stack grow toward each other to maximize memory utility.
Updated On: Jun 6, 2026
  • B, C, D, A
  • B, D, C, A
  • A, C, D, B
  • A, D, C, B
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

The layout of a process in virtual memory follows a standard structure in most operating systems. "Bottom to top" refers to moving from the lowest memory addresses to the highest memory addresses. 1. Memory Segments (Bottom to Top):
Text Segment (B): Located at the lowest addresses, this contains the executable machine code of the program. It is usually read-only.
Data Segment (C): Situated above the text segment, it contains global and static variables. It is further divided into initialized and uninitialized (BSS) data.
Heap Segment (D): This area is used for dynamic memory allocation (e.g., via malloc in C). It typically grows "upward" toward higher addresses.
Stack Segment (A): Located at the very top of the process address space, it stores temporary data such as function parameters, return addresses, and local variables. It typically grows "downward" toward the heap. 2. Final Sequence: Following the bottom-to-top (low to high address) logic, the order is: Text (B) $\to$ Data (C) $\to$ Heap (D) $\to$ Stack (A). 3. Verification: This sequence corresponds to identifiers B, C, D, A, which is Option (1).
Was this answer helpful?
0
0

Top CUET PG Data Science A.I Cyber Security and Computer Sci. Questions

View More Questions

Top CUET PG Operating Systems Questions

View More Questions