从程序员的角度看Linux内核和UNIX内核(例如FreeBSD)之间的区别
从程序员的角度来看Linux内核和UNIX内核(例如FreeBSD)之间的区别。 我搜索了几篇关于此的文章。他们从用户的角度和管理员的角度以及公司经理的角度对这些进行了比较。 任何人都可以找到文章或从程序员的角度说些什么吗?
我指的程序员是用户态程序员还是内核级程序员?
任何提示或启发真的很感激。
希望这不是一个让每个人都感到恶心的陈词滥调问题。 :P
difference between Linux kernel and UNIX kernel(such as FreeBSD) from programmer's point of view.
I searched several articles about this. They compared these from User's view and Administrator's view also from Company's manager's view.
Can any body find article or say something from programmer's view?
The programmer I means, both user land programmer or kernel level programmer?
Any hints or enlightenment is really appreciate.
Wish this is not a cliche question make everybody sick. :P
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
从标准的角度来看,确实没有任何区别。 Linux 是“POSIX”兼容的操作系统,FreeBSD、Mac OS X 和 Solaris 也都“POSIX”兼容。至少在理论上是这样。
一旦你超越了标准,就会发现很多差异。 Linux 像 inotify、udev 和其他一些系统是它所独有的。 FreeBSD 有 kqueue。他们对 ptrace 之类的东西的具体实现存在差异。例如,Mac OS X 的 ptrace 几乎没有其他 Unix 系统中提供的功能。
除了自定义库之外,开发工具也存在差异。 Solaris 和 FreeBSD 有 dtrace。 Linux 有 valgrind。 Mac OSX 有仪器。
您所看到的级别将影响您看到或看不到的差异。
From a standards point of view there really isn't any difference. Linux is a "POSIX" compliant OS, FreeBSD, Mac OS X and Solaris are also all "POSIX" compliant. In theory at least.
Once you move past the standards there are quite a few differences. Linux as inotify, udev and a bunch of other systems that are unique to it. FreeBSD has kqueue. There are differences in their exact implementations of things like ptrace. For example Mac OS X's ptrace has almost no functionality that you will find in the other Unix systems.
Beyond custom libraries there are differences in development tools. Solaris and FreeBSD have dtrace. Linux has valgrind. Mac OSX has instruments.
What level you are looking at will affect what differences you see or don't see.
对于用户态程序员来说,没有什么区别。用户态编程将编码为诸如 C 之类的 VM 语言,并由 C 库例程将其转换为较低级别的系统调用。
那些使用 Perl、Python、Java 等其他工具的工具甚至会从内核中删除,因此也不会直接影响它们。
对于内核程序员而言,由于内核本身不同,因此差异可能很大。尽管我在 Linux 中做了相当多的工作,但我还没有看到 FreeBSD 的内部结构,所以我无法明智地评论低级差异,但是(最后一点是知情意见,而不是福音),因为它们运行独立的开发流,具有完全相同的视图的机会很小。
For a userland programmer, there is no difference. The userland programming will be coding to a language VM like C and it will be up to the C library routines to translate that into lower level system calls.
Those using other tools such as Perl, Python, Java and so on, are even more removed from the kernel so it will not directly affect them either.
In terms of the kernel programmer, the differences are likely to be significant since the kernels themselves are different. I haven't seen the FreeBSD internals although I've done a fair bit of work inside Linux, so I can't comment intelligently on the low-level differences but (and this final bit is informed opinion, not gospel), since they run independent development streams, the chances of having exactly the same view is small.