zoukankan      html  css  js  c++  java
  • 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.

  • 相关阅读:
    PBOC中文件结构,文件类型解析
    AID-应用标识符的组成规则
    关于Jquery Ajax的用法
    使用tiled-0.16.1创建地图用于cocos2dx
    UIWebView加载各种类型的数据
    提交苹果审核App被拒原因
    swift_学习中遇到的错误
    iOS_自定义返回按钮
    UITextView控件_文字内容居左居上
    iOS开发----Xcode7升级之后插件无法使用与不小心点击Skipbundle的解决办法
  • 原文地址:https://www.cnblogs.com/rsapaper/p/6214437.html
Copyright © 2011-2022 走看看