积极答复者
多核CPU同一时刻能调度多个进程吗?

问题
答案
-
参考 第5章 CPU调度
http://blog.sina.com.cn/s/blog_630c97f20100vhc9.html
希望这些能帮助你。
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.
全部回复
-
参考 第5章 CPU调度
http://blog.sina.com.cn/s/blog_630c97f20100vhc9.html
希望这些能帮助你。
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey. -
多cpu和多核单cpu不同吧。多cpu环境下,当然可以用某一个cpu作为负载均衡的调度器,同一时刻将多个进程调度到不同的cpu上。但是多核单cpu呢?比如四核八线程的i7,只有一个cpu,但有四个核,难道用一个核做负载吗?仍然是问题中的例子,我的进程总共使用三个线程,那么只要调度给我两个物理核,一个(或者两个)逻辑核就够了。如果同时调度其他进程呢?同一时刻能够调度的其他进程,需要的cpu资源不应该超过2个物理核外加三个(或者两个)逻辑核。由此可知,调度队列不能够使用FIFO模式的队列。操作系统能够智能到这样的调度吗?
另外,不是所有程序都会在启动时开启线程池,更多时候是进程进入运行态后才会动态启动多个线程,数量未知(但可以确定不会超过cpu支持的最大线程数*2)。也就是说在多核单cpu的系统中,我的最大线程数为3的进程进入运行态后,os根本无法挑一个合适的进程进行调度?不是吗?