经典书籍翻译——深入理解Linux内核14

Preemptive kernel
When compiled with the “Preemptible Kernel” option, Linux 2.6 can arbitrarily interleave execution flows while they are in privileged mode. Besides Linux 2.6, a few other conventional, general-purpose Unix systems, such as Solaris and Mach 3.0, are fully preemptive kernels. SVR4.2/MP introduces some fixed preemption points as a method to get limited preemption capability.
Multiprocessor support
Several Unix kernel variants take advantage of multiprocessor systems. Linux 2.6 supports symmetric multiprocessing (SMP) for different memory models, including NUMA: the system can use multiple processors and each processor can handle any task—there is no discrimination among them. Although a few parts of the kernel code are still serialized by means of a single “big kernel lock,” it is fair to say that Linux 2.6 makes a near optimal use of SMP.
Filesystem
Linux’s standard filesystems come in many flavors. You can use the plain old Ext2 filesystem if you don’t have specific needs. You might switch to Ext3 if you want to avoid lengthy filesystem checks after a system crash. If you’ll have to deal with many small files, the ReiserFS filesystem is likely to be the best choice. Besides Ext3 and ReiserFS, several other journaling filesystems can be used in Linux; they include IBM AIX’s Journaling File System (JFS) and Silicon Graphics IRIX’s XFS filesystem. Thanks to a powerful object-oriented Virtual File System technology (inspired by Solaris and SVR4), porting a foreign filesystem to Linux is generally easier than porting to other kernels.
STREAMS
Linux has no analog to the STREAMS I/O subsystem introduced in SVR4, although it is included now in most Unix kernels and has become the preferred interface for writing device drivers, terminal drivers, and network protocols.

抢占式内核
Linux 2.6代码编译时选择“抢占式内核”选项,系统就可以在特权模式下任意地交错执行流。此外,还有其他少量的如Solaris 和Mach 3.0这样传统通用性的Unix系统则完全是抢占式内核。
SVR4.2/MP 则引入了一些固定的抢占点,以此来获得有限的抢占能力;
支持多处理器
有些Unix内核变种采用多处理系统。Linux2.6 支持针对不同型号的对称式多处理,包括NUMA:这样的系统可以使用多处理器而且每个处理器可以处理所有任务——这些处理器之间并没有区别。尽管一少部分内核代码采用“大内核锁”的方式进行序列化,Linux 2.6近乎是对称式处理的最佳实践。
文件系统
Linux的标准文件系统有许多不同的风格。如果你没有特殊的需求甚至可以直接使用原始的Ext2文件系统。如果你希望避免在系统崩溃之后出现漫长的文件系统检查你可以选择切换到Ext3。如果你不得不处理许多小文件,那么ReiserFS文件系统可能就是最好的选择了。除了Ext3和ReiserFS之外,Linux中还可以使用其他几款日志文件系统;它们包括IBM AIX的日志文件系统(JFS)
和硅图公司IRIX的XFS文件系统。得益于强大的面向对象虚拟文件系统技术(受Solaris和SVR4的启发而来的),将外来的文件系统移植到Linux中要比移植到其他系统中容易得多。

尽管当今的大多数Unix内核都包含了SVR4中引入的流IO子系统,并且这已经成为写设备驱动、终端驱动和网络协议的首选接口,但是Linux并没有类似的子系统。

猜你喜欢

转载自blog.csdn.net/m0_37546257/article/details/121296150