* 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
Attachment:
pgpcNRjDoqPVj.pgp
Description: PGP signature