Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1781084
  • 博文数量: 413
  • 博客积分: 8399
  • 博客等级: 中将
  • 技术积分: 4325
  • 用 户 组: 普通用户
  • 注册时间: 2011-06-09 10:44
文章分类

全部博文(413)

文章存档

2015年(1)

2014年(18)

2013年(39)

2012年(163)

2011年(192)

分类: LINUX

2011-11-23 21:56:30


Linux: Native POSIX Threading Library (NPTL)
Submitted by 
on September 20, 2002 - 1:45pm

Ulrich Drepper recently announced the first public release of the Red Hat sponsored "Native POSIX Thread Library" (NPTL). He explained, "Unless major flaws in the design are found this code is intended to become the standard POSIX thread library on Linux system and it will be included in the GNU C library distribution."

One test mentioned in Ulrich's email - running 100,000 concurrent threads on an IA-32 - generated some interesting discussion. Ingo Molnar explained that with the current stock 2.5 kernel such a test requires roughly 1GB RAM, and the act of starting and stopping all 100,000 threads in parallel takes only 2 seconds. In comparison, with the 2.5.31 kernel (prior to Ingo's recent threading work), such a test would have taken around 15 minutes.

Ingo provides further details:

"With the default split and kernel stack we can start up 94,000 threads on x86. With Ben's/Dave's patch we can have up to 188,000 threads. With a 2:2 GB VM split configured we can start 376,000 threads. If someone's that desperate then with a 1:3 split we can start up 564,000 threads."

And Ingo's response to the logical followup question, "why so many threads, the answer is because we can :)". Much of the discussion follows, and is well worth the time it takes to read...

。。。 。。。


阅读(961) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~