Process Address Space
Whenever an executable file is executed, it becomes a process. An executable file contains binary code grouped into a number of blocks called segments. Each segment is used for storing a particular type of data. A few segment names of a typical ELF executable file are listed below.
- text — Segment containing executable code
- .bss — Segment containing data initialized to zero
- data — Segment containing initialized data
- symtab — Segment containing the program symbols (e.g., function name, variable names, etc.)
- interp — Segment containing the name of the interpreter to be used
The readelf
command can provide further details of the ELF file. When such a file is loaded in the memory for execution, the segments are loaded in memory. It is not necessary for the entire executable to be loaded in contiguous memory locations. Memory is divided into equal sized partitions called pages (typically 4KB). Hence when the executable is loaded in the memory, different parts of the executable are placed in different pages (which might not be contiguous). Consider an ELF executable file of size 10K. If the page size supported by the OS is 4K, then the file will be split into three pieces (also called frames) of size 4K, 4K, and 2K respectively. These three frames will be accommodated in any three free pages in memory.
Read more about this topic: Fork (operating System)
Famous quotes containing the words process, address and/or space:
“The invention of photography provided a radically new picture-making processa process based not on synthesis but on selection. The difference was a basic one. Paintings were madeconstructed from a storehouse of traditional schemes and skills and attitudesbut photographs, as the man on the street put, were taken.”
—Jean Szarkowski (b. 1925)
“Self-confidence is apt to address itself to an imaginary dullness in others; as people who are well off speak in a cajoling tone to the poor.”
—George Eliot [Mary Ann (or Marian)
“The within, all that inner space one never sees, the brain and the heart and other caverns where thought and feeling dance their sabbath.”
—Samuel Beckett (19061989)