您的位置 首页 技术

golang能写操作系统吗

golang能写操作系统吗 当然是可以的。 这个是 2018 OSDI 上面的一篇 paper : The benefits and costs of writing a POSI…

golang能写操作系统吗

当然是可以的。

这个是 2018 OSDI 上面的一篇 paper : The benefits and costs of writing a POSIX kernel in a high-level language。在这篇 paper 中,作者就对比了用 Go 语言和 C 语言写操作系统内核的区别,最后的结论是:

In experiments comparing nearly identical system call, page fault, and context switch code paths written in Go and C, the Go version was 5% to 15% slower.

在比较用Go和C编写的几乎相同的系统调用,页面错误和上下文切换代码路径的实验中,Go版本的速度慢了5%至15%。

除此之外,Google 开源的 gvisor, Go 语言实现的用户态的 "linux 内核",也可以了解一下。

相关推荐:golang教程

以上就是golang能写操作系统吗的详细内容,更多请关注24课堂在线网其它相关文章!

本文来自网络,不代表24小时课堂在线立场,转载请注明出处:https://www.24ketang.cn/39410.html

为您推荐

返回顶部