[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: 启动一个java程序,为什么看到这么多同样的进程呢?



> On 7/3/05, Ling Li <lilingv@gmail.com> wrote:
> > 2.4的内核就是这样的,2.6就只有一个了。
> 
On Sun, Jul 03, 2005 at 09:57:01PM +0900, pnt wrote:
> 如果是这样的话,我估计和 thread library有关系。不知道有没有人知道细节。
> 如果谁能提供详细点的资料就好了。Thanks in advance.

嗯,首先声明一下我也从来没做过 threading 相关的编程,下面说的都是看来的
而已,未经实践检验,仅供参考。

从我读到的来看,threading 需要 kernel 的支持,但从根本上来说还是 libc 的
范畴(/lib/libpthread.so.0 和 /lib/tls/libpthread.so.0 文件都是在 libc6
package 里面的)。在 kernel 2.4 时,只支持一种叫做 linuxthreads 的模式,
所以 Debian 的 2.4 内核的系统用的就是这种 threading 模式。到了 kernel
2.6,新增加了对 nptl 模式的支持,Debian 的 libc6 会在使用 2.6 内核的时候
自动启用 nptl 的 threading 模式。如果要在 2.6 内核下使用原来的
linuxthreads 模式,估计也不是不可以。

如果有懂这方面的人详细说一下(至少说一下我的理解对不对),我也很感谢。

Ming
2005.07.03



Reply to: