Windows Server 2003 中的最大线程数是多少? [英] What's the maximum number of threads in Windows Server 2003?

查看:34
本文介绍了Windows Server 2003 中的最大线程数是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道吗?一个更大的问题是当你遇到这个最大值时会发生什么?这与其他 Windows 操作系统(如 Vista、XP 等)是否相同?

Does anyone know? And a bigger question is what happens when you encounter this maximum? Is this the same number with other Windows OSs such as Vista, XP etc.?

推荐答案

首先,我建议您阅读以下内容:http://blogs.msdn.com/oldnewthing/archive/2007/03/01/1775759.aspx

First I would advise reading this: http://blogs.msdn.com/oldnewthing/archive/2007/03/01/1775759.aspx

然后 http://blogs.msdn.com/oldnewthing/archive/2005/07/29/444912.aspx

总而言之,限制通常是堆栈空间(必须在连续块中),并且由于每个线程都消耗了这些分散的空间,因此您很快就会用完连续块.在 64 位机器和操作系统上,这不是什么问题.

To summarise, the limitation is normally stack space (which must be in contiguous blocks) and since every thread consumes this scattered about you rapidly run out of contiguous blocks. On 64 bit machines and operating systems this is much less of a problem.

存在缓解策略,但只会到此为止(并且依赖于每个线程不使用太多堆栈)

Mitigation strategies exist but will only go so far (and rely on you not using much stack per thread)

作为粗略指南:

  • 创建十几乎肯定会奏效
  • 在当前的服务器和桌面硬件上可能有数百个,但有风险
  • 几乎肯定会失败.

无论如何,您可能不需要创建超过 10 个(如果您确实确实需要,您应该已经知道这些信息)

You likely shouldn't need to create more than ten anyway (and if you really do need to you should know this information already)

这篇关于Windows Server 2003 中的最大线程数是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆