Concept:
• In UNIX-like operating systems, fork() is the primary system call used for process creation.
• It creates a new process by duplicating the existing process (the parent).
• Both the parent and the child continue execution from the instruction immediately following the fork() call.
Step 1: Understand the mechanism of fork()
When fork() is called, the kernel creates an exact copy of the parent process's address space.
This includes the code segment, data segment, heap, and stack.
The child gets a unique Process ID (PID).
Step 2: Identify the primary purpose
The function of fork() is strictly to spawn a new execution context (a child process).
It does not "create a program" (that is what exec() does).
It does not "create machine code" (that is what a compiler/assembler does).
While it involves memory management, "creating a child process" is its fundamental definition.