204k views
1 vote
If a process does not call exec after forking, A. the program specified in the parameter to exec will replace the entire process B. all the threads should be duplicated C. all the threads should not be duplicated D. none of above

User Object
by
4.4k points

1 Answer

6 votes

Answer:

b) all the threads should be duplicated

Step-by-step explanation:

The fork provides a process to start a new one, and the new process is not the same program. The exec system call com in play. Exec replaces the currently running process with information. The process is launching a new program firstly fork and create a new process. Exec load into memory. Fork copies of all attribute the new process except for memory. A clone system call implements the kernel fork. Forking provides the existing process. And the thread should be duplicated.

User Camile
by
4.1k points