您的位置:首页 > 其它

操作系统复习笔记一:Introduction

2014-04-01 21:18 357 查看
一、什么是操作系统?

1、计算机系统的组成:硬件、操作系统、程序、用户(包括人和其他机器)。(操作系统在计算机系统中的定位)

2、从用户的角度来看:

a program that provides an easy-to-use interface for using the hardware.

a program that helps maximize the system resource utilization.

a program that compromise between individual usability and utilization.

3、从系统的角度来看:

a resource allocator.

a control program.

4、总结:

对于什么是操作体统,并没有一个普遍的定义。

大家普遍比较赞同的观点是:one
kernel program running at all times on the computer.

实际上,操作系统是一系列程序的集合。其目的在于高效地使用计算机系统。

关键词:a resource allocator、a control program、a kernel program。

二、和操作系统相关的硬件

1、计算机启动

计算机通过引导程序(Bootstrap program)启动。引导程序通常写在ROM或者EPROM上,用来初始化整个系统,同时把操作系统内核加载到内存中。

2、中断(Interrupt)

An event that requires the attention of the OS is an interrupt.

generated by hardware or software. A trap is a software-generated interrupt caused either by an error or a user request.

Modern OSs are
interrupt driven.

Interrupt architecture must save the address of the interrupted instruction.

主要功能:将CPU控制权转移给中断服务程序。

3、存储结构

缓存(cache):用于保存最近使用过的数据的高速存储结构。

内存: only large storage media that the CPU can access directly. 易失性存储设备。

辅存:内存的扩展,大容量,非易失性存储设备。

4、I/O 设备

I/O devices and CPU can execute concurrently。

Each device controller is in charge of a particular device type and has a local buffer.(Buffer适用于小型数据传输,当一次性传输大量数据时造成的开销比较大)

Device controller informs CPU that it has finished its operation by causing an interrupt.

5、DMA(direct memory access)

Device controller directly transfers blocks of data between buffer storage and main memory without CPU intervention.

interrupt is generated per block instead of per byte.

6、硬件保护

双模式保护:两种模式(用户态和核心态),protecting the OS from errant user programs.

特权指令:可能对操作系统造成伤害或只能在核心态下被执行。

CPU保护:保证CPU不长期被某一进程占用。用Timer计时。

内存保护:保证进程被分配的内存资源不被其他进程破坏。使用基址寄存器和界限寄存器控制寻址范围。

I/O保护:保证不被用户程序在核心态获得控制权。所有的I/O指令都是特权指令。

三、操作系统分类及发展史

主机系统:NO OS -> 批处理系统 -> 多程序系统 -> 分时系统

桌面系统:单处理器系统

并行系统:多处理器系统(多个CPU)

紧耦合系统(多核,共享总线、内存等资源)

并行系统可分为非平衡(其中一个处理器分配其他处理器工作)和平衡两类。

分布式系统:多台物理设备的集合,通过网络互连。

集群系统:多个独立系统共享存储设备且通过网络(LAN)互连。

集群系统可分为非平衡(其中一个系统可以随时替代其他出故障的系统)和平衡(相互监督)两类。

实时系统:通常是为了满足某些领域的需要而开发的系统,有固定的时间约束,可分为硬实时(时间一到就切换作业)和软实时(可等待作业完成再切换)两种。

手持终端系统:主要问题是:有限的存储容量,处理器速度慢,屏幕小。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: