PROCESS STATES
COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE NINTH EDITION
To understand the operation of the short-term scheduler, we
need to consider the concept of a process state. During the lifetime of a process,
its status will change a number of times. Its status at any point in time is referred to
as a state. The term state is used because it connotes that certain information exists
that defines the status at that point. At minimum, there are five defined states for a
process (Figure 8.7):
• New: A program is admitted by the high-level scheduler but is not yet ready
to execute. The OS will initialize the process, moving it to the ready state.
• Ready: The process is ready to execute and is awaiting access to the processor.
• Running: The process is being executed by the processor.
• Waiting: The process is suspended from execution waiting for some system
resource, such as I/O.
• Halted: The process has terminated and will be destroyed by the OS.
For each process in the system, the OS must maintain information indicat-
ing the state of the process and other information necessary for process execution.
For this purpose, each process is represented in the OS by a process control block
(Figure 8.8), which typically contains
• Identifier: Each current process has a unique identifier.
• State: The current state of the process (new, ready, and so on).
• Priority: Relative priority level.
• Program counter: The address of the next instruction in the program to be
executed.
• Memory pointers: The starting and ending locations of the process in memory.
• Context data: These are data that are present in registers in the processor
while the process is executing, and they will be discussed in Part Three. For
now, it is enough to say that these data represent the “context” of the process.
The context data plus the program counter are saved when the process leaves
the running state. They are retrieved by the processor when it resumes execu-
tion of the process.
• I/O status information: Includes outstanding I/O requests, I/O devices (e.g., tape
drives) assigned to this process, a list of files assigned to the process, and so on.
• Accounting information: May include the amount of processor time and clock
time used, time limits, account numbers, and so on.
When the scheduler accepts a new job or user request for execution, it creates
a blank process control block and places the associated process in the new state.
After the system has properly filled in the process control block, the process is
transferred to the ready state.
PROCESS STATES的更多相关文章
- Linux Process VS Thread VS LWP
Process program program==code+data; 一个进程可以对应多个程序,一个程序也可以变成多个进程.程序可以作为一种软件资源长期保存,以文件的形式存放在硬盘 process: ...
- The Concept of a Process
COMPPUTER SCIENCE AN OVERVIEW 11th Edition One of the most fundamental concepts of modern operating ...
- Linux 日志报错 xxx blocked for more than 120 seconds
监控作业发现一台服务器(Red Hat Enterprise Linux Server release 5.7)从凌晨1:32开始,有一小段时间无法响应,数据库也连接不上,后面又正常了.早上检查了监听 ...
- Investigating Your RAM Usage
转载自:http://developer.android.com/intl/zh-cn/tools/debugging/debugging-memory.html Because Android is ...
- Android内存管理(5)*官方教程:Logcat内存日志各字段含义,查看当前内存快照,跟踪记录内存分配,用adb查看内存情况时各行列的含义,捕获内存快照的3种方法,如何让程序暴漏内存泄漏的方法
Investigating Your RAM Usage In this document Interpreting Log Messages 内存分析日志中各消息的含 ...
- Linux-进程管理
关于进程 Process what is process ? 什么是进程 process life cycle 进程的生命周期 process states 进程状态 什么是进程? 进程是已启动的可执 ...
- bootstrap-typeahead 自动补全简单的使用教程
参考链接: 参考1 : https://segmentfault.com/a/1190000006036166参考2 : https://blog.csdn.net/u010174173/articl ...
- Virtualization
time sharing——>virtualization. OS需要low-level machinery mechanisms and high-level intelligence. 前者 ...
- liunx进程管理之进程介绍
关于进程 process ====================================================================================Wha ...
随机推荐
- rabbitMq使用(mac平台)
1.下载 wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.5.3/rabbitmq-server-mac-standalone-3.5 ...
- C# 6新特性及示例代码
今天推荐的其实是一个Github开源项目,不过这个开源项目是专门介绍C# 6的最新特性,并给出了示例代码. 我们知道,微软即将发布Windows 10和Visual Studio 2015,在VS20 ...
- 在Linux中创建静态库.a和动态库.so
转自:http://www.cnblogs.com/laojie4321/archive/2012/03/28/2421056.html 在Linux中创建静态库.a和动态库.so 我们通常把一些公用 ...
- 能加载文件或程序集“System.Data.SQLite”或它的某一个依赖项。试图加载格式不正确的程序。
现象: 能加载文件或程序集“System.Data.SQLite”或它的某一个依赖项.试图加载格式不正确的程序.
- CodeForces Gym 100500A A. Poetry Challenge DFS
Problem A. Poetry Challenge Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/10 ...
- C#学习笔记(三)——流程控制
一.布尔逻辑 1.与布尔有关的2元运算符 2.布尔运算符 PS:“&”与“&&“之类的区别 (1)”&“是按位运算,也就是说是将2个数都转换成2进制,然后逐个进行与操作 ...
- 浅谈c++ new and delete or new [] and delete []
http://www.cnblogs.com/hazir/p/new_and_delete.html 在 C++ 中,你也许经常使用 new 和 delete 来动态申请和释放内存,但你可曾想过以下问 ...
- 解析Cloudera Manager内部结构、功能包括配置文件、目录位置等
转载自 http://www.aboutyun.com/thread-9189-1-1.html 问题导读1.CM的安装目录在什么位置? 2.hadoop配置文件在什么位置? 3.Cloudera m ...
- 克隆或拷贝的VMware虚拟机IP问题解决
克隆的虚拟机或是将虚拟机通过快照回到过去某个状态后,会上不了网. 如果不想看细节,可直接跳到小结部分. 问题描述: 运行service network restart时 Device eth0 doe ...
- 递推DP POJ 1163 The Triangle
题目传送门 题意:找一条从顶部到底部的一条路径,往左下或右下走,使得经过的数字和最大. 分析:递推的经典题目,自底向上递推.当状态保存在a[n][j]时可省去dp数组,空间可优化. 代码1: /*** ...