多线程 – Windows XP中每个线程时间片需要多长时间?

前端之家收集整理的这篇文章主要介绍了多线程 – Windows XP中每个线程时间片需要多长时间?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我试图找出在 Windows中每个线程timeslice(量子)需要多长时间,但是我发现的唯一的信息是关于15到20ms或20-30ms的时钟周期.
如何找到这些信息?
我认为它可能会因操作系统而异,但我不确定.
我感谢任何关于这个问题的建议.

谢谢.

解决方法

This KB article有一些关于Windows 2000 Server版本的信息:

Currently in Windows,3 quantums are equal to either 10 milliseconds (single processor) or 15 milliseconds (multiple-processor Pentium). This depends on the hardware abstraction layer (HAL) selected for your computer. Original Equipment Manufacturer (OEM) HALs may have a different value. Time slices that are fixed at 36 quantums are currently used when background services are selected (as you might choose in a typical server installation).

因此,在多处理器Pentium上,量程将为5 ms,时间片长达180 ms.对我来说似乎相当大,但是

原文链接:https://www.f2er.com/java/124547.html

猜你在找的Java相关文章