Describe the process of restoring the CPU state for both the parent and child processes after a `fork()` system call. What elements are included in the CPU state?
The kernel restores the CPU state( registers, program counter, stack pointer ) for both the parent and child processes. This involves setting the CPU registers to the values they had when fork was called, with modifications for the return values.