开发内核以支持多CPU
我希望进入操作系统内核开发领域,并认为我的贡献是扩展 SANOS 操作系统以支持多核机器。 我一直在阅读有关操作系统的书籍 (Tannenbaum) 以及研究 BSD 和 Linux 如何应对这一挑战,但仍然停留在几个概念上。
当 SANOS 在多个 CPU 上运行时,是否需要拥有更复杂的调度算法,或者当前现有的算法是否可以正常工作?
我知道线程与其启动的核心具有亲和力是一个好主意,但是这是通过调度还是通过更改线程创建方式的实现来处理的?
要使 SANOS 能够在具有数百个内核的计算机上运行,需要考虑什么? 据我所知,BSD和Linux最多只能支持十几个核心。
I am looking to get into operating system kernel development and figured my contribution would be to extend the SANOS operating system in order to support multiple core machines. I have been reading books on operating systems (Tannenbaum) as well as studying how BSD and Linux have tackled this challenge but still am stuck on several concepts.
Does SANOS need to have more sophisticated scheduling algorithms when it runs on multiple CPUs or will what is currently in place work fine?
I know that it is a good idea for threads to have affinity to a core that they were started on, but is this handled via scheduling or by changing the implementation of how threads are created?
What would need to be considered such that SANOS could run on a machine with hundreds of cores? From what I can tell, BSD and Linux at best only support a maximum of a dozen of cores.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你的阅读材料很好。 所以没有问题。 还可以看看斯坦福大学有关操作系统设计的 CS 可下载讲座。
您还需要决定如何实现线程,以及如何在内核中表示进程(无论是重进程还是轻进程)。 线程是内核管理的吗? 用户空间管理? 这些事情都会对调度程序设计产生影响。 看看POSIX线程在各种操作系统中是如何实现的。 有太多东西需要你思考:)
简而言之对于逻辑存在或应该存在的位置,实际上没有任何直接的答案。 这一切都取决于设计、应用期望、(程序上的)时间限制等等。
希望这会有所帮助,但我不是这方面的专家。
Your reading material is good. SO no problems there. Also take a peek at the CS downloadable lectures on operating system design from Stanford.
You also need to decide how your threads are implemented, and how a process is represented (be it heavy or lightweight) in the kernel. Are threads kernel managed? user-space managed? These things all have an impact on scheduler design. Look at how POSIX threads are implemented in various operating systems. There is just so much for you to think about :)
in short there are not really any straight-cut answers to where the logic does, or should reside. It is all down to design, application expectation, time-constraints (on the programs) and so on.
Hope this helps, I am not an expert here however.