Correct option is B
A. fork():
·
Description: Creates a child process.
· The fork() system call is used to create a new process, which becomes the child process of the caller.
·
Match:
IV
B. exec():
·
Description: Loads the specified program in memory.
· The exec() family of functions replaces the current process image with a new process image.
·
Match:
III
C. kill():
·
Description: Sends a signal from one process to another process.
· The kill() system call is used to send a signal to a process or a group of processes.
·
Match:
I
D. exit():
·
Description: Indicates termination of the current process.
· The exit() system call is used to terminate a process, returning a status value to the parent process.
·
Match:
II
Information Booster:
1.
fork():
· Creates a copy of the current process.
· The child process has a unique process ID but shares the same code and data as the parent.
2.
exec():
· Loads a new program into the process's memory, replacing the existing program.
· Commonly used in conjunction with fork() for process execution.
3.
kill():
· Can send various signals (e.g., SIGKILL, SIGSTOP) to control or terminate processes.
· The kill - 9 command forcefully terminates processes.
4.
exit():
· Cleans up resources and exits the program.
· Returns an exit status to the parent process.
Additional Knowledge:
· fork() and exec() are often used together to spawn and execute new processes in Unix-like systems.
· The kill() system call does not necessarily "kill" a process; it sends a signal that may be handled in various ways by the target process.
· Signals in Unix include:
·
SIGKILL: Forceful termination.
·
SIGSTOP: Pause the process.