pthread

I am so confused about the user threads and kernel threads.Suppose I created a thread using pthread create call in Linux ,whether it will be a user thread or kernel thread.If it user thread,then how its map to kernel thread.

I heard about the M:1,M:N,1:1 mapping methods.Which method linux is implemented?I need to achieve the mutiprocessor benefit,which mapping technique is good for me.Whether this capability is provide by the pthread library or the operating system

Linux uses the 1:1 thread mapping model, which means that every single user-mode thread is mapped to a single kernel thread.

You - the user - run a program in user-mode, with user threads ;

If you want to benefit from multicore hardware (or hardware multithreading), then the 1:1 approach fits your needs ;

Good luck, and success !
alexandre botao
<< botao {dot} org >>