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的更多相关文章

  1. Linux Process VS Thread VS LWP

    Process program program==code+data; 一个进程可以对应多个程序,一个程序也可以变成多个进程.程序可以作为一种软件资源长期保存,以文件的形式存放在硬盘 process: ...

  2. The Concept of a Process

    COMPPUTER SCIENCE AN OVERVIEW 11th Edition One of the most fundamental concepts of modern operating ...

  3. Linux 日志报错 xxx blocked for more than 120 seconds

    监控作业发现一台服务器(Red Hat Enterprise Linux Server release 5.7)从凌晨1:32开始,有一小段时间无法响应,数据库也连接不上,后面又正常了.早上检查了监听 ...

  4. Investigating Your RAM Usage

    转载自:http://developer.android.com/intl/zh-cn/tools/debugging/debugging-memory.html Because Android is ...

  5. Android内存管理(5)*官方教程:Logcat内存日志各字段含义,查看当前内存快照,跟踪记录内存分配,用adb查看内存情况时各行列的含义,捕获内存快照的3种方法,如何让程序暴漏内存泄漏的方法

    Investigating Your RAM Usage In this document Interpreting Log Messages                 内存分析日志中各消息的含 ...

  6. Linux-进程管理

    关于进程 Process what is process ? 什么是进程 process life cycle 进程的生命周期 process states 进程状态 什么是进程? 进程是已启动的可执 ...

  7. bootstrap-typeahead 自动补全简单的使用教程

    参考链接: 参考1 : https://segmentfault.com/a/1190000006036166参考2 : https://blog.csdn.net/u010174173/articl ...

  8. Virtualization

    time sharing——>virtualization. OS需要low-level machinery mechanisms and high-level intelligence. 前者 ...

  9. liunx进程管理之进程介绍

    关于进程 process ====================================================================================Wha ...

随机推荐

  1. Java Hour2

    有句名言,叫做10000小时成为某一个领域的专家.姑且不辩论这句话是否正确,让我们到达10000小时的时候再回头来看吧. 本文作者Java 现经验约为1 Hour,请各位不吝赐教. Hour2 检测字 ...

  2. jquery+php实现用户输入搜索内容时自动提示

    index.html <html> <head>     <meta charset=;} #search_auto li a:hover{background:#D8D ...

  3. 在Windows中使用MinGW编译X264

    转自:http://www.cnblogs.com/xiongjiaji/archive/2012/06/08/2541265.html 参考:http://ayobamiadewole.com/Bl ...

  4. Centos6.4编译安装Node.js(已验证)

    1.准备源文件包 [felix@MyTerminal Downloads]$ mv node-6.5.0 node [felix@MyTerminal Downloads]$ ls node node ...

  5. Selenium测试规划

    开源工具经过近几年的发展,已经出现了一大批成熟的可应用到实际项目中的产品,其中,在WEB自动化测试领域,Selenium支持广泛的浏览器和脚本开发语言,高效的执行效率,获得广泛的应用. 本课程结合Se ...

  6. hdu 1284 分硬币 && uva 147

    #include<bits/stdc++.h> using namespace std; int main() { unsigned ]; memset(dp,,sizeof(dp)); ...

  7. Ecological Premium

    #include<bits/stdc++.h> using namespace std; int main() { int n,m; unsigned long long int a,b, ...

  8. MVC 使用HandleErrorAttribute统一处理异常

    HandleErrorAttribute继承自FilterAttribute,且实现了IExceptionFilter接口. 属于AOP思想的一种实现,MVC的四大筛选器(权限,动作,结果,异常)中的 ...

  9. Codeforces 86D Powerful array(莫队算法)

    和BZOJ2038差不多..复习一下. #include<cstdio> #include<cmath> #include<algorithm> using nam ...

  10. ZOJ1655 Transport Goods(Floyd)

    利用Floyd的DP状态转移方程. #include<cstdio> #include<cstring> #include<queue> #include<a ...