Just after fork:

Global variables,.data,.text, stack, heap, environment variables, user ID, host directory, process working directory, signal handling…

Process ID 2. Fork Return value 3. Parent process ID 4. It looks like the child copied the parent’s 0-3G user-space content, along with the parent’s PCB, but the PID is different. Is it really true that every child fork has to make a full copy of the parent’s 0-3g address space and then map it to physical memory? Of course not! The parent and child processes share read and copy write. Designed this way, the child saves memory by executing either the parent’s logic or its own logic.

Parent and child processes share: 1. File descriptor (open file structure) 2. Mapping area created by Mmap

The child process inherits the user number and user group number from its parent process. The stack; Shared memory; Directory (current directory, root directory); Open the file descriptor; However, parent and child processes have separate address Spaces and PID parameters, different parent process numbers, and their own file descriptors.