Question: In Linux, a new process is created by calling fork(). While we generally think of fork() as a system call, in actuality the function
In Linux, a new process is created by calling fork(). While we generally think of fork() as a system call, in actuality the function is a wrapper around the clone() system call, which does the real work of creating a new process. See the Notes section of the man page for fork() for additional details. To create a new thread, threading libraries will call clone() directly with a different set of arguments. Because the kernel is involved with thread creation (clone() is a system call, after all), this implies Linux uses kernel-level threading (which is true, and it has a one-to-one threading model like what is shown in Figure 4.8 in the textbook). Given that a thread is visible to the kernel, is created using the same system call as process creation, and that each thread in the kernel maps to a single thread in user space, is it correct to say a thread in Linux is really just the same thing as a process? Why or why not?
Step by Step Solution
3.44 Rating (167 Votes )
There are 3 Steps involved in it
In the above image PID column is a Unique process iden... View full answer
Get step-by-step solutions from verified subject matter experts
