System call invocation: The process invokes the fork function, which is a part of the C std library. The fork function triggers a software interrupt or a sytem call instruction.
The CPU switches from user mode to kernel mode. This transition is necessary because direct access to hardware and critical system resources is restricted to kernel mode to ensure system stability and security. The current state of the CPU process is saved.
The system call instruction triggers a predefined entry point in the kernel, known as the system call handler.