操作系统
操作系统能提供哪些服务、系统调用与 shell 接口、内核结构(单体/分层/微内核/模块化)。
以下图片展示了操作系统所能提供的服务:

对于用户来说,操作系统可以提供一系列的服务:
Another set of OS functions exists for ensuring the efficient operation of the system itself via resource sharing
让我们回顾一下计算机的逻辑层次:硬件-->操作系统-->系统程序-->应用程序。系统程序(System Program)也被称为系统工具(System Utility),为程序开发和执行提供了一个方便的环境。有些系统程序只是系统调用的简单用户接口,而其他的可能相当复杂。
系统程序可分为以下几类:
一个经典的案例就是 Unix,其结构如下:
Unix 操作系统包含了两个部分:
上面我们看到的都是巨核(Monolithic)操作系统,意思是它们的 Kernel 层都很大。Microkernel System Structure 做出了一系列更新:
以下是一个示例:
一个现实中的例子就是 Mac OS X 的结构:
A virtual machine takes the layered approach to its logical conclusion. It treats hardware and the operating system kernel as though they were all hardware
A virtual machine provides an interface identical to the underlying bare hardware
The operating system creates the illusion of multiple processes, each executing on its own processor with its own (virtual) memory
The resources of the physical computer are shared to create the virtual machines
VMM/Hypervisor 有两种:
Type 1 Hypervisor:Bare-Metal Hypervisor
Type 2 Hypervisor:
Paravirtualization:
在刚开机的时候,我们需要从磁盘中调用操作系统,生成操作系统。
例子有 lab1 中的 OpenSBI。
例如:OpenSBI 放在 0x80000000,用于启动 kernel。
Written by
Comments