operating-systemmemory-addressaddress-space

Parent process and it's child process address space


When I read the book Operating system design and implementation, in chapter 2, Process creation, here is what it mentions:

The child's initial address space is a copy of the parent's, but there are two distinct address involved

This is a bit vague to me. It seems it is telling me they have the same address space but I believe that is not true.

Can anyone explain the detail for this?


Solution

  • An address space is the range of addresses (values) that are visible to the program. For instance a program address’s space can be from 0x00000000 to 0xFFFFFFFF. The child and the parent have the same address space, but, for instance, the adress 0x00D543A7 is a different address in parent and a different address in child. The OS (and to some extent the processor) takes care of address translations so that a two logical addresses from two different programs that have the same value map map to a different physical memory addresses.