ARM pthread create an addictional process. why?

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
I've noticed a strange behavior in pthread_create call...
I've a deamon PID[60] PPID[1],
I call pthread_create and I'll have:
    my deamon PID[60] PPID[1],
    a strange process PID[62] PPID[60]
    my thread PID[81] PPID[62]

look like that my arm kernel needs an intermediate process PID[62]
to create my threads.

If I exit my thread and create another thread I'll have:
    my new thread PID[102] PPID[62]

Probably is the correct behavior...

Could you clarify me?

unamed: Linux arm9 2.4.26-vrs1-mx1ads_0406251307

Thanks




Re: ARM pthread create an addictional process. why?


Quoted text here. Click to load it






linux-2.4 didn't have threads;   libraries for theading forked
processes to do the trick.

Re: ARM pthread create an addictional process. why?


Quoted text here. Click to load it

Thank you very much, I suspected something like this.



Re: ARM pthread create an addictional process. why?

Quoted text here. Click to load it

This is a very misleading response. The library uses the clone() system
call which is markedly different from fork().

The Linux 2.6 implementation also uses clone(), but there is extra
support in the kernel which improves efficiency and POSIX compliance.

Re: ARM pthread create an addictional process. why?
Quoted text here. Click to load it

The threading implementation in Linux 2.4 uses LinuxThreads. This
creates a management thread when it is in use. This is not specific to
ARM, it happens with all architectures, though I'm not sure if the new
NPTL implementation does it.

So, if you call pthread_create once, there will be a total of three PIDs
- the original process; the management thread; and the new thread you
created. I believe that the management thread goes away when the last
thread exits.


Re: ARM pthread create an addictional process. why?
Quoted text here. Click to load it

Thank you very much.




Site Timeline