Thanx,
But when I create two pthreads, does kernel schedule both of them individually as two entities?
Or libc is doing everything in user space??
When I create new p_thread, will kerenel create new task ??
Tharindu
* Tharindu Rukshan Bamunuarachchi <tharindunix@xxxxxxxxx> [2006-09-14 13:51]:
What is the different between pthread_create and fork() system call in
kernel??
What are the advantageous pthread over fork()??
fork() creates a new process while pthread_create() creates a new
thread. Basically, resources (such as memory) are shared between the
threads in one process while each process has its separate resources.
To be concrete: If you change a global variable after fork() the other
process doesn't see the change. In a thread, the other thread also
sees the change.
Bernhard--
Jeder dumme Junge kann einen Käfer zertreten. Aber alle Professoren der Welt
können keinen herstellen.
-- Arthur Schopenhauer
--
Tharindu Rukshan Bamunuarachchi
all fabrications are subject to decay