Operating System-Process(2)进程表&&中断处理
上一篇文章阐述了进程的基本信息,本文主要介绍进程的实现,主要内容:
- 进程表(Process Table or Process Control Blocks)
- 中断处理(Interrupt)
一、进程表
操作系统以数组的形式维护了一个进程表,每个进程有一个入口,示意图如下图所示。针对每一个进程,进程表中保存着进程的状态、程序计数器(PC)、指向栈的指针、进程对应内存的地址等等。
上图中的Scheduler会处理外部的中断以及对于进程的调度。
当进程的状态有Running切换为Ready或者Blocked时,进程的所以数据都应该被正确的保存,从而当再次运行时候进程能够像从来没有被停止过一样继续运行。
二、中断处理
2.1 中断示意
上一篇文章就说了一个CPU同一时间只能运行一个进程,但是用户却有电脑同时运行很多进程的假象。上一篇文章的解释是CPU会调度,让不同的进程轮流在CPU上进行运行。这个调度在操作系统中是通过中断来实现的。比如用户正在用Word进行编辑,突然有一封邮件到达了,这个时候操作系统会产生一个中断,该中断最终会让CPU开始运行Email进程。
2.2 中断处理
上面的示意图中Word Process的状态从Running变为了Ready。等Email处理完成,CPU最终还会回到Word进程,Word进程会再次运行,上面说了当再次运行时,Word进程应该如同没有被停止过一样,如何做到?这里最主要的就是在中断发生后对当前运行进程的数据以及状态的保存。
基本流程:
Operating System-Process(2)进程表&&中断处理的更多相关文章
- [Chapter 3 Process]Practice 3.3 Discuss three major complications that concurrent processing adds to an operating system.
3.3 Original version of Apple's mobile iOS operating system provied no means of concurrent processi ...
- book-rev8 Chapter 0 Operating system interfaces
Chapter 0 第0章 Operating system interfaces 操作系统接口 The job of an operating system is to share a comput ...
- osquery An Operating System Instrumentation Framewor
catalog . Getting Started . install guide for OS X and Linux . Features Overview . Logging . query e ...
- POJ #2448 A New Operating System
Time Limit: 20000MS Memory Limit: 65536K Total Submissions: 1165 Accepted: 110 Case Time Limit: ...
- 如何定位“Operating system error 32(failed to retrieve text for this error. Reason: 15105)”错误中被占用的文件
之前在这篇"Operating system error 32(failed to retrieve text for this error. Reason: 15105)"博 ...
- Operating system error 32(failed to retrieve text for this error. Reason: 15105)
一台数据库服务器的事务日志备份作业偶尔会出现几次备份失败的情况,具体的错误信息为: DATE/TIME: 2018/7/30 12:10:52 DESCRIPTION: BackupDiskFi ...
- How to Make a Computer Operating System
How to Make a Computer Operating System 如何制作一个操作系统(翻译版) 原文地址:Github:How to Make a Computer Operating ...
- InnoDB: Operating system error number 87 in a file operation. 错误87的解决方法
InnoDB: Operating system error number 87 in a file operation. 错误87的解决方法 140628 8:10:48 [Note] Plugi ...
- Modern Operating System
No one can do all things, learn to be good at use what others already did. Most computers have two m ...
- Operating system management of address-translation-related data structures and hardware lookasides
An approach is provided in a hypervised computer system where a page table request is at an operatin ...
随机推荐
- VS2015 C#6.0 中的那些新特性(转自http://www.cnblogs.com/henryzhu/p/new-feature-in-csharp-6.html)
自动属性初始化 (Initializers for auto-properties) 以前我们是这么写的 为一个默认值加一个后台字段是不是很不爽,现在我们可以这样写 只读属性的初始化(Getter-o ...
- office2013安装/激活
ed2k://|file|cn_office_professional_plus_2013_x64_dvd_1134006.iso|914106368|E5FBAE9EE9CB35D5E777EA78 ...
- centos7 mysql允许远程连接设置
Mysql为了安全性,在默认情况下用户只允许在本地登录,可是在有此情况下,还是需要使用用户进行远程连接,因此为了使其可以远程需要进行如下操作: 一.允许root用户在任何地方进行远程登录,并具有所有库 ...
- centos7 使用 maven
http://www.cnblogs.com/jackluo/archive/2013/02/06/2901816.html
- HR_ROS 节点信息
https://stackoverflow.com/questions/24638063/install-node-serialport-module-on-arm-linux https://blo ...
- Linux删除文件后空间不释放
最近线上 elasticsearch 由于磁盘空间不足报错,于是乎对磁盘进行了分析,删除了一些 Tomcat 日志文件,但是删除后发现并没有磁盘空间释放.于是 google 了一下. 原来在Linux ...
- [原创]java WEB学习笔记19:初识MVC 设计模式:查询,删除 练习(理解思想),小结 ,问题
本博客为原创:综合 尚硅谷(http://www.atguigu.com)的系统教程(深表感谢)和 网络上的现有资源(博客,文档,图书等),资源的出处我会标明 本博客的目的:①总结自己的学习过程,相当 ...
- 【leetcode刷题笔记】Length of Last Word
Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the l ...
- python内置方法补充bin
bin(x) 英文说明:Convert an integer number to a binary string. The result is a valid Python expression. I ...
- 2014年互联网IT待遇
1. 13k*14~16k*145.美团 13k*15~16k*15,也有更高的.6.去哪儿 11k*16~15k*167.人人技术类(12K-14K)*14 (2014)8.58同城 20w+9.网 ...