对于内核/OS还是C吗? [英] For kernel/OS is C still it?

查看:99
本文介绍了对于内核/OS还是C吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢操作系统,最终希望成为一名主要从事内核工作的OS开发人员.将来,C仍将是首选语言,我还应该尝试学习什么?

I like operating systems and would eventually like to become a OS developer mostly working on kernels. In the future will C still be the language of choice and what else should I be trying to learn?

推荐答案

我认为可以肯定地说,操作系统的低级部分(例如内核)由于其速度而将继续用C编写.就像其他地方提到的那样,您将需要了解内核某些部分的汇编程序(需要将内核加载到内存中).但是您几乎不需要汇编知识就可以在内核上工作.一个很好的例子是,如果您要实现文件系统.

I think it's safe to say that low-level parts of operating systems (e.g. the kernel) will continue to be written in C because of its speed. Like mentioned elsewhere, you will need to know assembler for certain parts of the kernel (something needs to load the kernel into memory). But you can work on the kernel with little or no assembly knowledge. A good example would be if you're implementing a file system.

不要担心操作系统使用哪种语言.重要的是如何使用操作系统以及可以做些什么来改进它们.一个很好的例子是Unix首次出现的时间.文件系统的inode位于磁盘的前端,数据位于剩余空间中.当您要在磁盘的不同部分中查找所有文件时,这不能很好地执行.然后,创建了 Berkeley快速文件系统以创建磁盘感知文件系统.这意味着将inode靠近其相应的数据.我遗漏了很多细节,但是我希望这可以说明,思考如何改进操作系统而不是使用哪种语言进行编程更重要.

Don't worry about what language the operating system is implemented in. What's important is how an operating systems are used, and what can be done to improve them. A good example is when Unix first came out. The file system had the inodes at the front of the disk, and data in the remaining space. This didn't perform very well as you were seeking to different parts of the disk for all files. Then the Berkeley Fast File System was created to make a disk aware file system. This means having inodes near their corresponding data. I'm leaving out a lot of details, but I hope this illustrates that it's more important to think about how an operating system can be improved rather than what language it will be programmed in.

操作系统的一些最新趋势是虚拟化和分布式计算(请参见Google在 MapReduce 上的论文. >).文件系统,安全性,调度(尤其是使用多核处理器)等一直是人们关注的领域,即使这些问题并不是新问题.

Some recent trends in operating systems are virtualization and distributed computing (see Google's paper on MapReduce). File systems, security, scheduling (especially with multi-core processors), etc are continually areas of interest even though these problems are not new.

如果您想了解有关内核开发的更多信息,这里有一些资源:

Here are some resources if you want to learn more about kernel development:

  • Linux Kernel Newbies - Resource for those who want to get started on modifying the Linux kernel.
  • xv6 source - x86 port of Unix version 6. Used by MIT to teach an operating systems class. Simple, and easy to extend (more info).
  • Linux Kernel Map - Call chain of system calls in Linux. Useful in visualizing what a system call does.

底线:开始熟悉内核并阅读研究人员正在写的文章( USENIX 是对此很有用).这种知识比学习一种新语言更有价值,因为如果编写的操作系统发生了转变,则可以将一种语言的大多数概念轻松地转移到另一种语言.希望这会有所帮助!

Bottom line: Start getting familiar with the kernel and read papers on what researchers are writing about (USENIX is useful for this). This knowledge is much more valuable than learning a new language, as most concepts from one language can easily be transferred to another if there does happen to be a shift in what operating systems are written. Hope this helps!

这篇关于对于内核/OS还是C吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆