博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ios Architecture
阅读量:7127 次
发布时间:2019-06-28

本文共 3430 字,大约阅读时间需要 11 分钟。

Architecture

The foundation layer of Darwin and OS X is composed of several architectural components, as shown in . Taken together, these components form the kernel environment. 

Figure 3-3  OS X kernel architecture

Important:  Note that OS X uses the term kernel somewhat differently than you might expect.

 

“A kernel, in traditional operating-system terminology, is a small nucleus of software that provides only the minimal facilities necessary for implementing additional operating-system services.” — from The Design and Implementation of the 4.4 BSD Operating System, McKusick, Bostic, Karels, and Quarterman, 1996.

Similarly, in traditional Mach-based operating systems, the kernel refers to the Mach microkernel and ignores additional low-level code without which Mach does very little.

In OS X, however, the kernel environment contains much more than the Mach kernel itself. The OS X kernel environment includes the Mach kernel, BSD, the I/O Kit, file systems, and networking components. These are often referred to collectively as the kernel. Each of these components is described briefly in the following sections. For further details, refer to the specific component chapters or to the reference material listed in the bibliography.

Because OS X contains three basic components (Mach, BSD, and the I/O Kit), there are also frequently as many as three APIs for certain key operations. In general, the API chosen should match the part of the kernel where it is being used, which in turn is dictated by what your code is attempting to do. The remainder of this chapter describes Mach, BSD, and the I/O Kit and outlines the functionality that is provided by those components.

Mach

Mach manages processor resources such as CPU usage and memory, handles scheduling, provides memory protection, and provides a messaging-centered infrastructure to the rest of the operating-system layers. The Mach component provides

  • untyped interprocess communication (IPC)

  • remote procedure calls (RPC)

  • scheduler support for symmetric multiprocessing (SMP)

  • support for real-time services

  • virtual memory support

  • support for pagers

  • modular architecture

General information about Mach may be found in the chapter . Information about scheduling can be found in the chapter . Information about the VM system can be found in .

BSD 

Above the Mach layer, the BSD layer provides “OS personality” APIs and services. The BSD layer is based on the BSD kernel, primarily FreeBSD. The BSD component provides

  • file systems

  • networking (except for the hardware device level)

  • UNIX security model

  • syscall support

  • the BSD process model, including process IDs and signals

  • FreeBSD kernel APIs

  • many of the POSIX APIs

  • kernel support for pthreads (POSIX threads)

The BSD component is described in more detail in the chapter .

Networking

OS X networking takes advantage of BSD’s advanced networking capabilities to provide support for modern features, such as Network Address Translation (NAT) and firewalls. The networking component provides

  • 4.4BSD TCP/IP stack and socket APIs

  • support for both IP and DDP (AppleTalk transport)

  • multihoming

  • routing

  • multicast support

  • server tuning

  • packet filtering

  • Mac OS Classic support (through filters)

More information about networking may be found in the chapter .

 

 

https://developer.apple.com/library/content/documentation/Darwin/Conceptual/KernelProgramming/Architecture/Architecture.html#//apple_ref/doc/uid/TP30000905-CH1g-TPXREF102

转载地址:http://jweel.baihongyu.com/

你可能感兴趣的文章
layer.open
查看>>
一位10年Java工作经验的架构师聊Java和工作经验
查看>>
简单钩子
查看>>
PHP知识点--变量与常量
查看>>
公共DNS服务
查看>>
安装最新Nginx
查看>>
PHP截取IE浏览器并缩小原图的方法
查看>>
SVN客户端常用命令
查看>>
几块瑞
查看>>
js中的hasOwnProperty()和isPrototypeOf()
查看>>
assign,copy,retain -Object-C中纠结的属性(转)
查看>>
发布系统之发布流程和发布salt相关命令
查看>>
从加载的XML文档重建工作流
查看>>
python基础知识~list详解
查看>>
jQuery对象和DOM对象的互换
查看>>
项目包进行分层
查看>>
linux 一些命令
查看>>
poj 3909
查看>>
redis之 3.0集群安装
查看>>
Java类加载机制
查看>>