What is the basic difference between a pthread and fork w.r.t. linux in terms of implementation differences and how the scheduling varies (does it vary ?)
I ran strace on two similar programs , one using pthreads and another using fork, both in the end make clone() syscall with different arguments, so I am guessing the two are essentially the same on a linux system but with pthreads being easier to handle in code.
Can someone give a deep explanation?
EDIT : see also a related question
question from:https://stackoverflow.com/questions/5514464/difference-between-pthread-and-fork-on-gnu-linux