对于内核/操作系统,C 仍然是它吗?

编程入门 行业动态 更新时间:2024-10-16 00:21:19
本文介绍了对于内核/操作系统,C 仍然是它吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我喜欢操作系统,并最终希望成为一名主要从事内核开发的操作系统开发人员.将来,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 内核新手 - 为想要开始修改 Linux 内核的人提供的资源.
  • xv6 源 - x86 端口Unix 版本 6.被 MIT 用于教授操作系统课程.简单且易于扩展(更多信息).
  • Linux Kernel Map - Linux 系统调用的调用链.有助于可视化系统调用的作用.
  • 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!

更多推荐

对于内核/操作系统,C 仍然是它吗?

本文发布于:2023-11-12 10:47:42,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1581274.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:仍然是   内核   操作系统

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!