Identify and describe the key kernel data structures involved in process replacement using `execl()`. How do these structures facilitate the transition to the new process image?
The key kernel data structures involved in process replacement are:-
Task Struct('task_struct')
It is a primary data structure representing a process in the linux kernel. It contains information about the process's state, memory layout,open files, signal handler, etc.
Memory Descriptor('mm_struct')
This structure describes the process's memory layout, including pointers to all memory segments.
Virtual Memory Area('vm_area_struct')
Each segment in the process's memory layout is described by a vm_area_struct. These structures are linked together and represented by the mm_struct.
File Descriptor Table
The task_struct contains a pointer to the file descriptor table. This table keeps tracks of all open descriptors for the process.
Signal Handling
The task_struct table contains information about signal handlers. Signals are reset to their default behavior upon an exec call unless they are explicitly preserved.