1 / 24
文档名称:

操作系统知识点整理.docx

格式:docx   大小:2,061KB   页数:24页
下载后只包含 1 个 DOCX 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

操作系统知识点整理.docx

上传人:分享精品 2017/7/26 文件大小:2.01 MB

下载得到文件列表

操作系统知识点整理.docx

文档介绍

文档介绍:《操作系统》知识点总结
Chap 1
1. What is an Operating System
(OS 运行在内核态的软件)
an operating system is as an extended machine and a resource manager
2. The program that users interact with, usually called the shell when it is text based and the GUI (Graphical User Interface).
3. puters have two modes of operation: kernel mode and user mode. The operating system is the most fundamental piece of soft­ware and runs in kernel mode (also called supervisor mode).In this mode it plete access to all the hardware and can execute any instruction the machine is capable of executing. The rest of the software runs in user mode, in which only a subset of the machine instructions is available.
内核态中,OS拥有对所有的硬件的完全访问权,可以执行机器能够运行的任何指令。软件的其余部分运行在用户态下,只使用了机器指令中的一个子集。
4. To obtain services from the operating system, a user program must make a system call, which traps into the kernel and invokes the operating system.
Chap 2: Processes and Threads
Process
A process is just an executing program, including the current values of the program counter, registers and variables.
进程的三态模型:
1) Running(运行):该时刻进程实际占有CPU
2) Ready(就绪):可运行,但因为其他进程正在运行而暂时停止
3) Block(阻塞):除非某种外部事件发生,否则进程不能运行
进程表(process table):每个进程占有一个进程表项(process entry)(也叫进程控制块, PCB),该表项包含了进程状态的所有信息
CPU利用率
CPU utilization = 1 –pn(n个进程,每个等待io的时间与停留在内存中时间的比为p)
Threads
1. 允许在同一个进程空间中存在多个线程,这些线程之间有较大的独立性
一个进程中所有线程共享的内容(进程的属性):

每个线程独有的内容:
(每个线程有自己的堆栈)
2. 线程实现的两种方式——用户空间和内核中
①在用户空间中实现线程
内核对线程包一无所知,从内核角度考虑,就是按正常的方式管理,即单线程进程(存在运行时系统)

②在内核中实现线程
在某个线程希望创建一个新线程或撤销一个已有线程时,它进行一个系统调用,这个系统调用通过对线程表的更新完成线程创建和撤销工作。

③混合实现
在此模型中,每个内核级线程有一个可以轮流使用的用户级线程集合。
Inter munication/ IPC
1. Situations like this, where two or more processes are reading or writing some shared data and the final result depends on who runs precisely when(进程运行的精确时序), are called race conditions.
2. Critical Regions(临界区)
prohibit(阻止) more than one process from reading and writing the shared data at the same time—— mutual exclusion(互斥)
That part of the progra