ARM pthread create an addictional process. why?

Feb 02, 2007 5 Replies

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


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

Thank you very much, I suspected something like this.

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.

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.

"Geronimo W. Christ Esq" ha scritto nel messaggio news: snipped-for-privacy@proxy00.news.clara.net...

Thank you very much.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required