从用户模式增加线程数量 [英] Increase thread quantum from user-mode
问题描述
在Linux内核3.0+上是否可以从用户模式增加线程的数量?怎么样?
Is it possible on Linux kernel 3.0+ to increase thread's quantum from user-mode? How?
推荐答案
我怀疑是否有可能.我很快找到了此页面( http://www.javamex.com/tutorials/threads/thread_scheduling_2 .shtml ),这表明线程的量子长度始终是可变的,并受执行环境的许多属性的影响.
I doubt it's possible. I quickly found this page ( http://www.javamex.com/tutorials/threads/thread_scheduling_2.shtml ) which suggests that a thread's quanta length is variable anyway, and subject to many attributes of the execution environment.
我想,如果确实需要,可以编写一个改变它的内核模块,但是那样您就进入了痛苦的境地.
I suppose if you really needed to it should be possible to write a kernel module that alters it, but then you're entering painful territory.
您正在做什么,无论如何都需要更长的量子长度?也许还有另一种方法.
What are you doing that needs longer quanta lengths anyway? Maybe there's an alternative approach.
这篇关于从用户模式增加线程数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!