【转】MacOS 和 Linux 内核的区别

有些人可能认为 MacOS 和 Linux 内核有相似之处,因为它们可以处理类似的命令和类似的软件。甚至有人认为苹果的 MacOS 是基于 Linux 的。事实上,这两个内核的历史和特性是非常不同的。今天,我们来看看 MacOS 和 Linux 内核的区别。

Some people might think that there are similarities between the macOS and the Linux kernel because they can handle similar commands and similar software. Some people even think that Apple’s macOS is based on Linux. The truth is that both kernels have very different histories and features. Today, we will take a look at the difference between macOS and Linux kernels.

MacOS 内核的历史

我们将从 MacOS 内核的历史开始。1985年,由于与首席执行官 John Sculley 和苹果董事会发生争执,Steve Jobs 离开了苹果。然后,他创建了一家名为 NeXT 的新电脑公司。乔布斯希望尽快推出一台新电脑(带有新操作系统)。为了节省时间,NeXT 团队使用了 Carnegie Mellon 的 Mach 内核及其部件。创建 NextStep 操作系统的 BSD 代码库。

NeXT 从未在财务上取得成功,部分原因是乔布斯习惯于花钱,就像他还在苹果一样。与此同时,苹果曾多次尝试升级操作系统,甚至与 IBM 合作。1997年,苹果以 4.29 亿美元收购了 NeXT 。作为交易的一部分,史蒂夫·乔布斯( Steve Jobs )重返苹果,NextStep 成为 MacOS 和 iOS 的基础。

History of macOS Kernel

We will start with the history of the macOS kernel. In 1985, Steve Jobs left Apple due to a falling out with CEO John Sculley and the Apple board of directors. He then founded a new computer company named NeXT. Jobs wanted to get a new computer (with a new operating system) to market quickly. To save time, the NeXT team used the Mach kernel from Carnegie Mellon and parts of the BSD code base to created the NeXTSTEP operating system.

NeXT never became a financial success, due in part to Jobs’ habit of spending money like he was still at Apple. Meanwhile, Apple had tried unsuccessfully on several occasions to update their operating system, even going so far as to partner with IBM. In 1997, Apple purchased NeXT for $429 million. As part of the deal, Steve Jobs returned to Apple and NeXTSTEP became the foundation of macOS and iOS.

Linux 内核的历史

与 MacOS 内核不同的是,Linux 并不是作为商业活动的一部分而创建的,而是由芬兰计算机科学专业的 Linus Torvalds 于 1991 年创建的。最初,该内核是按照 Linus 自己的计算机的规范编写的,因为他想利用这台计算机的新的 80386 处理器。1991 年 8 月,Linus 将他的新内核的代码发布到了 Usenet 。不久,他就收到了来自世界各地的代码和功能建议。第二年,Orest Zborowski 将 X Window 系统移植到 Linux ,使它能够支持图形用户界面。

在过去的 27 年里,Linux 已经慢慢地发展壮大。它不再是学生的小项目。现在,它运行在世界上大部分的计算设备世界超级计算机里。不再寒酸。

History of Linux Kernel

Unlike the macOS kernel, Linux was not created as part of a commercial endeavor. Instead, it was created in 1991 by Finnish computer science student Linus Torvalds. Originally, the kernel was written to the specifications of Linus’ computer because he wanted to take advantage of its new 80386 processor. Linus posted the code for his new kernel to the Usenet in August of 1991. Soon, he was receiving code and feature suggestions from all over the world. The following year Orest Zborowski ported the X Window System to Linux, giving it the ability to support a graphical user interface.

Over the last 27 years, Linux has slowly grown and gained features. It’s no longer a student’s small-time project. Now it runs most of the world’s computing devices and the world’s supercomputers. Not too shabby.

MacOS 内核的特性

MacOS 内核正式被称为 XNU 。缩写表示 “ XNU 不是 Unix ” 。根据苹果的 GitHub 页面,XNU 是 “ 将 Carnegie Mellon University 开发的 Mach 内核与 FreeBSD 和 C++ API 中用于编写驱动程序的组件结合在一起的混合内核 ” 。该代码的 BSD 子系统部分 “ 通常是作为微内核系统中的用户空间服务器实现的 “ 。Mach 部分负责低级工作,如多任务处理、保护内存、虚拟内存管理、内核调试支持和控制 I / O 。

Features of the macOS Kernel

The macOS kernel is officially known as XNU. The acronym stands for “ XNU is Not Unix. ” According to Apple’s Github page, XNU is “a hybrid kernel combining the Mach kernel developed at Carnegie Mellon University with components from FreeBSD and C++ API for writing drivers”. The BSD subsystem part of the code is “ typically implemented as user-space servers in microkernel systems ”. The Mach part is responsible for low-level work, such as multitasking, protected memory, virtual memory management, kernel debugging support, and console I/O.

Linux 内核的特性

虽然 MacOS 内核结合了微内核( Mach )和完整内核( BSD )的特性,但是 Linux 仅仅是一个完整内核。完整内核负责管理 CPU 、内存、进程间通信、设备驱动程序、文件系统和系统服务器调用。

Features of Linux Kernel

While the macOS kernel combines the feature of a microkernel (Mach) and a monolithic kernel (BSD), Linux is solely a monolithic kernel. A monolithic kernel is responsible for managing the CPU, memory, inter-process communication, device drivers, file system, and system server calls.

简要说明 Mac 和 Linux 内核的区别

MacOS 内核( XNU )的出现时间比 Linux 长,它是基于两个甚至更旧的代码库的组合。另一方面,Linux 是新的,从头开始编写的,并且在更多的设备上使用。

Difference between Mac and Linux kernel in one line

The macOS kernel (XNU) has been around longer than Linux and was based on a combination of two even older code bases. On the other hand, Linux is newer, written from scratch, and is used on many more devices.



  • 原文:https://itsfoss.com/mac-linux-difference/
  • 中文翻译参考自:https://www.linuxprobe.com/linux-kernels-macos.html ,有修改

Was this article helpful?

Related Articles

Leave A Comment?