[英]can a thread library implemented in user space support hyper-threading?
Assume a multiprocessor architecture with an OS which may or may not support kernel-level threads 假设具有操作系统的多处理器体系结构可能支持也可能不支持内核级线程
Correct me where I go wrong: 纠正我在哪里出错:
Your first three assumptions are correct. 您的前三个假设是正确的。
Corollary 1 depends on the OS scheduler. 结果1取决于OS调度程序。 Scheduling can be based on threads only, not processes so there is no inherent guarantee that processes with different thread counts get the same total time.
调度只能基于线程,而不能基于进程,因此无法固有地保证具有不同线程数的进程获得相同的总时间。
Many user-space schedulers go a hybrid route and schedule m
user space threads to n
OS threads (with m >> n
), thus avoiding some of the overheads of OS thread creation. 许多用户空间调度程序采用混合路径,并将
m
用户空间线程调度到n
OS线程( m >> n
),从而避免了OS线程创建的一些开销。 There is no way of magically achieving concurrency without resorting to OS mechanism to bootstrap it. 如果不借助OS机制来引导并发,就无法神奇地实现并发。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.