1. When I call pthread_create(), which system call will be fired , is it clone()??
2. Can i change priority of threads individually using chrt or nice ??
Thankx for greate info.
Tharindu
On 9/14/06, Jesper Juhl <jesper.juhl@xxxxxxxxx> wrote:
On 14/09/06, Tharindu Rukshan Bamunuarachchi <tharindunix@xxxxxxxxx> wrote:
> Like to know about threading Linux
>
> Does Linux support 1-1 User-Kernel thread mapping??
>
NPTL (Native POSIX Thread Library) is 1x1 - The older LinuxThreads
library was not.
> For e.g.
>
> If i create 2 posix threads in one application .. (pthread_create)
>
> does kernel scheduler treat two threads individually ??
>
Yes.
>
> What is the different between pthread_create and fork() system call in
> kernel??
>
pthread_create() creates a new thread, fork() creates a new process.
>
> What are the advantageous pthread over fork()??
>
The difference here is the difference between threads and processes.
Threads share memory space, processes do not, threads are faster to
create than processes, processes with multiple threads are harder to
debug, etc etc. Read up on process vs thread.
Here are some documents to read - google can find you more :
http://en.wikipedia.org/wiki/Native_POSIX_Thread_Library
http://people.redhat.com/drepper/nptl-design.pdf
http://www-128.ibm.com/developerworks/linux/library/l-threading.html?ca=dgr-lnxw07LinuxThreadsAndNPTL
http://www.csie.nctu.edu.tw/~cdsheen/enews/read.php?server=netnews.csie.nctu.edu.tw&group=comp.os.linux.development.system&artnum=157968
http://www.tldp.org/FAQ/Threads-FAQ/
--
Jesper Juhl <jesper.juhl@xxxxxxxxx>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
--
Tharindu Rukshan Bamunuarachchi
all fabrications are subject to decay