Skip to content

Commit

Permalink
修改
Browse files Browse the repository at this point in the history
  • Loading branch information
arkingc committed Jul 30, 2018
1 parent 9486846 commit 2d5cbdb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions interview/C++.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@
- 数据成员的布局——[虚继承](https://github.com/arkingc/note/blob/master/C++/C++%E5%AF%B9%E8%B1%A1%E6%A8%A1%E5%9E%8B.md#5%E8%99%9A%E7%BB%A7%E6%89%BF)(虚基类子对象的偏移信息记录在虚函数表之前与使用一个额外指针来记录的对比?)
- [指向数据成员的指针](https://github.com/arkingc/note/blob/master/C++/C++%E5%AF%B9%E8%B1%A1%E6%A8%A1%E5%9E%8B.md#35-%E6%8C%87%E5%90%91data-members%E7%9A%84%E6%8C%87%E9%92%88)
* **函数成员**
- [Nonstatic成员函数的转换](https://github.com/arkingc/note/blob/master/C++/C++%E5%AF%B9%E8%B1%A1%E6%A8%A1%E5%9E%8B.md#41-member%E7%9A%84%E5%90%84%E7%A7%8D%E8%B0%83%E7%94%A8%E6%96%B9%E5%BC%8F)(目的是为了提供和一般非成员函数相同的效率)
- [nonstatic成员函数的转换](https://github.com/arkingc/note/blob/master/C++/C++%E5%AF%B9%E8%B1%A1%E6%A8%A1%E5%9E%8B.md#41-member%E7%9A%84%E5%90%84%E7%A7%8D%E8%B0%83%E7%94%A8%E6%96%B9%E5%BC%8F)(目的是为了提供和一般非成员函数相同的效率)
- [重载成员函数的名字处理](https://github.com/arkingc/note/blob/master/C++/C++%E5%AF%B9%E8%B1%A1%E6%A8%A1%E5%9E%8B.md#%E6%88%90%E5%91%98%E5%87%BD%E6%95%B0%E9%87%8D%E8%BD%BD%E7%9A%84%E5%A4%84%E7%90%86)
- [Static成员函数的转换](https://github.com/arkingc/note/blob/master/C++/C++%E5%AF%B9%E8%B1%A1%E6%A8%A1%E5%9E%8B.md#2static-member-functions%E9%9D%99%E6%80%81%E6%88%90%E5%91%98%E5%87%BD%E6%95%B0)
- [static成员函数的转换](https://github.com/arkingc/note/blob/master/C++/C++%E5%AF%B9%E8%B1%A1%E6%A8%A1%E5%9E%8B.md#2static-member-functions%E9%9D%99%E6%80%81%E6%88%90%E5%91%98%E5%87%BD%E6%95%B0)
- [编译器如何处理经由指针和经由‘.’进行的调用](https://github.com/arkingc/note/blob/master/C++/C++%E5%AF%B9%E8%B1%A1%E6%A8%A1%E5%9E%8B.md#3virtual-member-functions%E8%99%9A%E5%87%BD%E6%95%B0)
- [指向函数成员的指针](https://github.com/arkingc/note/blob/master/C++/C++%E5%AF%B9%E8%B1%A1%E6%A8%A1%E5%9E%8B.md#43-%E6%8C%87%E5%90%91member-function%E7%9A%84%E6%8C%87%E9%92%88)
- 虚函数的调用——[单继承](https://github.com/arkingc/note/blob/master/C++/C++%E5%AF%B9%E8%B1%A1%E6%A8%A1%E5%9E%8B.md#1%E5%8D%95%E7%BB%A7%E6%89%BF%E4%B8%AD%E7%9A%84%E8%99%9A%E5%87%BD%E6%95%B0)
Expand Down
4 changes: 3 additions & 1 deletion 操作系统/操作系统.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@

## 3.中断

**允许“其他模块”(I/O、存储器)中断“处理器”正常处理过程的机制**

### 3.1 目的

提高CPU利用率,防止一个程序垄断CPU资源
Expand Down Expand Up @@ -214,7 +216,7 @@ I/O程序:

当处理器正在执行程序并遇到一个I/O相关的指令时,它通过给相应的I/O模块发命令来执行这个指令:

1)使用可编程I/O时,I/O模块执行请求的动作并设置I/O状态寄存器中相应的位,**但它并不进一步通 知处理器,尤其是它并不中断处理器**,因此处理器在执行I/O指令后,还需定期检查I/O模块的状态,确定I/O操作是否完成。为了确定I/O模块是否做好了接收或发送更多数据的准备,处理器等待期间必须不断询问I/O模块的状态,这会严重降低整个系统的性能
1)使用可编程I/O时,I/O模块执行请求的动作并设置I/O状态寄存器中相应的位,**但它并不进一步通 知处理器,尤其是它并不中断处理器**,因此处理器在执行I/O指令后,还需定期检查I/O模块的状态。为了确定I/O模块是否做好了接收或发送更多数据的准备,处理器等待期间必须不断询问I/O模块的状态,这会严重降低整个系统的性能

2)如果是中断驱动I/O,在给I/O模块发送I/O命令后,处理器可以继续做其它事。当I/O模块准备好与处理器交换数据时,会中断处理器并请求服务,处理器接着响应中断,完成后再恢复以前的执行过程

Expand Down

0 comments on commit 2d5cbdb

Please sign in to comment.