4705浏览
查看: 4705|回复: 1

【OS】L02a OS Structure OverView

[复制链接]
楼主今天进度条走慢了……花了俩小时居然只刷了L2四分之一的内容……

特来刷帖。


-----------------------------------------------------------------------------------------------------
1. OS System Services

【OS】L02a OS Structure OverView图7
主要包括
Process/Thread management and scheduling,
Memory Management,
Interprocess Communication,
File System,
Access to I/O devices such as microphones + speaker,
Access to the network


2. Importance and Goals of OS Structure

OS作为硬件和上层应用程序之间的桥梁,当然是很重要的 = =

【OS】L02a OS Structure OverView图1【OS】L02a OS Structure OverView图2
其重要性体现在:
Protection - 不能让系统能直接被小白程序员搞奔溃啊……
Performance - 处理速度要快啊……
Flexibility - 要灵活可扩展啊……
Scalability - 硬件上去了,性能啥的必定得跟上啊……
Agility - 要迎合一下程序的需求
Responsiveness - 外围设备比如鼠标键盘啥的响应得快啊……

3. Commercial OS
目前三大主流商业操作系统是
Mac OS
Windows
Linux

4. Monolithic, DOS-like, Microkernel-based OS Structure

【OS】L02a OS Structure OverView图3【OS】L02a OS Structure OverView图4【OS】L02a OS Structure OverView图5

Monolithic Structure - 每个App有自己的硬件内存地址(HDA)(hardware address space),OS有自己的HDA, hardware由OS管理。
DOS-like Structure - 同用一块HDA,彼此坦诚,万一来了小白程序员,就会把操作系统搞坏。。由于早期计算机功能比较单一,而且也没有什么多线程,因此采用了这种方式。
MicroKernel-based OS Structure - 每个App有自己的HDA, OS Services有自己的HDA, MicroKernel有自己的HDA(以及simple abstraction,Interprocess Commnuication)。

【OS】L02a OS Structure OverView图8
上述三图简洁来说就是
DOS-like Structure把操作系统直接裸露在程序员面前让程序员动它的内核比较容易崩溃。
Monolithic Structure让OS和App能够直接对接加快了运行速度,但是它木有Customization,比如,Video Game首要需求是硬件响应快,计算质数首要需求是CPU运算速度快,Monolithic Structure木有对此的调节?(这块不是太懂),但是后面说到可以通过算法来进行优化。另外,由于Monolithic Structure只给了有限的权限给用户,要进行OS Services的扩展就有点不太好搞了。
而MicroKernel由于App和OS Services之间通信还要通过Microkernel,地址要传输两次,数据要拷贝两次,还是来回,就会牺牲速度。

下图简明地表示了以上三种Struture的各自优缺点。

【OS】L02a OS Structure OverView图6

而我们的目标就是找到一个平衡点来努力实现Performance, Protection和Extensibility三者。






扩展阅读:
http://www.buyya.com/microkernel/chap2.pdf

Screen Shot 2017-03-22 at 5.22.24 PM.png
Screen Shot 2017-03-22 at 5.27.18 PM.png
Screen Shot 2017-03-22 at 10.08.40 AM.png
Screen Shot 2017-03-22 at 10.08.40 AM.png

gada888  版主

发表于 2019-6-26 16:18:05

没太看懂
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

为本项目制作心愿单
购买心愿单
心愿单 编辑
[[wsData.name]]

硬件清单

  • [[d.name]]
btnicon
我也要做!
点击进入购买页面
上海智位机器人股份有限公司 沪ICP备09038501号-4

© 2013-2024 Comsenz Inc. Powered by Discuz! X3.4 Licensed

mail