操作系统中的处理机调度调度

处理 (Process)

In the operating system, there are numerous task and application program run simultaneously. A program is stored in the hard disk or any other form of secondary storage. When the program is executed it must be loaded in the system’s memory. A process can be viewed as a program in execution. In the system, each process is assigned a unique Id when it is created and it will be referenced by the unique Id until the process completes execution and it is terminated. A process is an entity which performs the basic unit of work or one work at a time. We can say that a process is an instance of a computer program that is being executed. A process contains the program code and the activity that is going to be performed. when the computer program is in secondary memory then it is a passive entity or when a process is in main memory then it is an active entity. In the system, several processes may be associated with the same program.

在操作系统中,有许多任务和应用程序同时运行。 程序存储在硬盘或任何其他形式的辅助存储中。 执行程序时,必须将其加载到系统内存中。 可以将进程视为正在执行的程序。 在系统中,每个进程在创建时都会分配一个唯一的ID,并且唯一ID会引用该ID,直到该进程完成执行并终止为止。 流程是一次执行基本工作单元或一项工作的实体。 我们可以说一个进程是一个正在执行的计算机程序的实例。 一个过程包含程序代码和将要执行的活动。 当计算机程序位于辅助内存中时,它是一个被动实体,或者当进程位于主内存中时,它是一个主动实体。 在系统中,几个进程可能与同一程序相关联。

A process held a number of attributes like hardware, memory, CPU, and progress.

一个进程拥有许多属性,例如硬件,内存,CPU和进度。

Craft.io分类 (Process classification)

A process can be broadly categorized into the following two types based on its execution:

根据流程的执行情况,大致可将其分为以下两种类型:

  • I/O-Bound process

    I / O绑定过程

    An I/O-bound process is a process whose execution time is determined mainly by the amount of time it spends completing I/O operations.

    绑定到I / O的进程是其执行时间主要由其完成I / O操作所花费的时间确定的进程。

  • CPU-Bound process

    CPU绑定进程

    A CPU-bound process is a process whose execution time is determined by the speed of the CPU it runs on. A CPU-bound process can complete its execution faster if it is running on a faster processor.

    受CPU限制的进程是其执行时间取决于其运行的CPU速度的进程。 如果受CPU约束的进程在更快的处理器上运行,则可以更快地完成其执行。

    Note: There is a third category - Memory-bound process. However, since RAM serves as I/O for the processor, this can be considered as an instance of the I/O-bound process type.

    注意:第三类-内存绑定进程。 但是,由于RAM用作处理器的I / O,因此可以将其视为I / O绑定进程类型的实例。

Further a process can be broadly categorized into the following two types based on execution mode.

另外,基于执行模式,可以将处理大致分为以下两种。

Kernel mode: In the kernel mode, a process has unrestricted access to the system hardware it can execute privileges instruction and can access both user and kernel address space.

内核模式:在内核模式下,进程可以不受限制地访问系统硬件,它可以执行特权指令,并且可以访问用户和内核地址空间。

Example: Most of the device drivers in the system execute as kernel mode processes.

示例:系统中的大多数设备驱动程序都以内核模式进程执行。

User mode: In the user mode it has no direct access to the underlying system hardware it can only access its own user address space of other processes and it cannot execute privileged instructions.

用户模式:在用户模式下,它不能直接访问基础系统硬件,只能访问其他进程自己的用户地址空间,并且不能执行特权指令。

Example: web- browser is executed as a user- mode process.

示例: Web浏览器作为用户模式进程执行。

Craft.io调度 (Process scheduling)

On a computer system, there are often numerous processes that need to be executed simultaneously. Furthermore, the requests for resources necessary for their execution are made asynchronously. Therefore, to handle competing requests for resources including the processor, the OS employs a process scheduler. The process scheduler assigns each process the necessary resources and its turn for execution on the CPU. The decision to schedule a process is made by a scheduling algorithm. The scheduler maintains three queues, to schedule the processes.

在计算机系统上,通常有许多进程需要同时执行。 此外,异步执行对执行其所需的资源的请求。 因此,为了处理对包括处理器在内的资源的竞争请求,OS使用了进程调度程序。 进程调度程序为每个进程分配必要的资源及其轮流,以便在CPU上执行。 调度流程的决定由调度算法做出。 调度程序维护三个队列,以调度进程。

Job queue: The job queue is the set of all processes on the system.

作业队列:作业队列是系统上所有进程的集合。

Ready queue: The ready queue has all the processes that are loaded in main memory. These processes are ready and waiting for their turn to execute as soon as the CPU becomes available.

就绪队列:就绪队列具有所有加载到主内存中的进程。 这些进程已准备就绪,等待轮到CPU可用时立即执行。

Device queue: The set of processes waiting for an I/O device to become available, such as a printer. This queue is also known as the Blocked Queue.

设备队列:等待I / O设备变得可用的一组进程,例如打印机。 此队列也称为阻塞队列。

.minHeight{ min-height: 250px; } @media (min-width: 1025px){ .minHeight{ min-height: 90px; } } .minHeight{ min-height: 250px; } @media (min-width: 1025px){ .minHeight{ min-height: 90px; } }

流程执行 (Process Execution)

When a program is loaded into the memory (process memory) and it becomes a process and it can be divided into four sections, stack, heap, text and data.

当程序加载到内存(进程内存)中并成为一个进程时,可以分为四个部分:堆栈,堆,文本和数据。

Stack: The stack is used for local variables when the local variables are declared in the memory of some spaces on the stack is reserved for them.

堆栈:当局部变量在堆栈中某些空间的内存中被保留时,将堆栈用于局部变量。

Heap: The heap is used in the system for the dynamic memory allocation and it is managed by calls to new, delete, malloc, free like commands.

堆:堆在系统中用于动态内存分配,并且通过调用new,delete,malloc和free之类的命令进行管理。

Data section: The data section is made for of the global and the static variables when it is allocated and initialized prior to executing the main function.

数据部分:数据部分是在执行主功能之前进行分配和初始化时由全局变量和静态变量组成的。

Text section: The text section is made for the compiled program code when the program is launched it is read from non-volatile storage in the system.

文本部分:启动程序时,将从系统中的非易失性存储器中读取已编译的程序代码的文本部分。

Craft.io状态 (Process states)

When a process starts its execution it changes its states or goes through the various states. We can define a process states in parts by the current activity of that process. Each process may be in one or more in the states when it is executing.

当进程开始执行时,它会更改其状态或经历各种状态。 我们可以通过该过程的当前活动来部分定义一个过程状态。 每个进程在执行时可能处于一个或多个状态。

  1. New

    A process is in the new states when it is newly created in the system.

    在系统中新创建进程后,该进程将处于新状态。

  2. Ready

    准备

    When the process is created it move to the ready state and in this state, the process is ready for their execution.

    创建流程后,它将进入就绪状态,在此状态下,流程已准备好执行。

  3. Run

    A process in the running state when it is currently running process in the CPU. At a time only one process can be under execution in a single processor.

    当前正在CPU中运行的进程时,处于运行状态的进程。 一次只能在一个处理器中执行一个进程。

  4. Wait or block

    等待或封锁

    When the process is executed for I/O it moves to the wait or block state.

    当为I / O执行该过程时,它将进入等待或阻止状态。

  5. Terminated or completed

    终止或完成

    When the process completed its execution it enters into the terminated state. In this states, all the changes made by the process permanently save on the memory.

    进程完成执行后,将进入终止状态。 在这种状态下,该过程所做的所有更改将永久保存在内存中。

  6. Suspended ready

    暂停准备

    When the ready queue is full some process move to the suspend ready state so that there is no load on the ready queue.

    当就绪队列已满时,某些进程将移至暂挂就绪状态,以使就绪队列上没有负载。

  7. Suspended block

    悬浮块

    When the waiting queue is full some processes move to the suspend ready state so that there is no load on the block state.

    当等待队列已满时,某些进程将移至暂挂就绪状态,以便在块状态上没有负载。

A process is not itself a process it is actually a passive entity so its content is stored in the hard disk whereas a running process is a passive entity so the program counter counts the next instruction to be executed. In the system, two processes may be linked with the same program and these process cannot be considered as two separate processes. For any instances, many users may be running at the main program.

一个进程本身并不是一个进程,它实际上是一个被动实体,因此它的内容存储在硬盘中,而正在运行的进程是一个被动实体,因此程序计数器会计算下一条要执行的指令。 在系统中,两个进程可能与同一程序链接,并且这些进程不能视为两个单独的进程。 对于任何情况,许多用户可能正在主程序上运行。

翻译自: https://www.includehelp.com/operating-systems/process-classification-and-scheduling.aspx

操作系统中的处理机调度调度

操作系统中的处理机调度调度_操作系统中的流程分类和调度相关推荐

  1. 操作系统读写者问题实验报告_操作系统知识点总结

    用户态和内核态 用户态和内核态的区别? 明白这两个概念之前,我们得知道用户空间和内核空间. 用户空间:指的就是用户可以操作和访问的空间,这个空间通常存放我们用户自己写的数据等. 内核空间:是系统内核来 ...

  2. python中哪里用到缩进_建筑防火中各类门的总结归纳!乙级门?甲级门?都哪里用到了!...

    大家在学习防火部分时,会遇到各种场所设置不同耐火性能的防火门,很杂乱的感觉,今天这里就好好总结一下,希望对大家能有帮助!一:双设门1.防烟楼梯间:此处的防烟楼梯间分为两种:一种是普通意义上的,即咱们经 ...

  3. 图像中值滤波python代码_图像中值滤波FPGA实现

    C语言实用数字图像处理.pdf6.34 MB05-11-13|19:30 FPGA实验报告-李炎东.doc633.66 kB16-01-14|10:28 中值滤波在红外成像引信中的应用及硬件实现.ca ...

  4. 中如何设置电气栅格_游戏中的设置界面如何设计?

    设置界面每个游戏都会有,如今设计师和玩家都对此见怪不怪了,那么作为一个交互设计师,在设计的时候到底需要注意一些什么?如何设计才能做到又符合逻辑又好用? 设置界面作为一个给玩家提供更改游戏内设定的界面, ...

  5. idea中怎么新建vue项目_项目中使用vue-awesome-swiper

    一.简介 Swiper常用于移动端网站的内容触摸滑动 Swiper是纯javascript打造的滑动特效插件,面向手机.平板电脑等移动终端,以及PC端网站.Swiper能实现触屏焦点图.触屏Tab切换 ...

  6. 操作系统读写者问题实验报告_操作系统 37

    这里是操作系统自学笔记第37节 Hard Disk Drives 磁盘的最小单位是扇区(sector),每个sector 512 byte,是磁盘原子操作的单位:扇区编号0-n-1是address s ...

  7. 微信开发中消息回复的代码_消息中的消息

    微信开发中消息回复的代码 Ste·ga·no·graph·y / stegəˈnägrəfi / (noun): the practice of concealing messages or info ...

  8. java中记忆深刻的问题_工作中碰到比较印象深刻的问题(面试必问)

    面试官经常会问到这么一个问题.有些人可能有些误区认为我们工作中碰到的问题都必须是很牛的技术来解决了才能说出来.其实不是的,我们工作中碰到的任何难点都只是在解决办法上的思想上没有打通而已. 举个例子: ...

  9. python中的datatype啥意思_案例中使用的是dataType,但是用在联系上面dataType不可用,必须改写成type:..._慕课问答...

    dataType和type是两个配置,代表不同意思: dataType 类型:String 预期服务器返回的数据类型.如果不指定,jQuery 将自动根据 HTTP 包 MIME 信息来智能判断,比如 ...

最新文章

  1. 员外带你读论文:LINE: Large-scale Information Network Embedding
  2. ironpython是什么2.7_是否可以在IronPython2.7.5中使用请求?
  3. H5调用手机拨打电话的功能
  4. 宝塔添加多占点_宝塔面板启用WordPress多站点子域名、子目录
  5. java xsd 解析 xml文件_Java针对XSD文件验证XML文件的最佳方法是什么?
  6. python怎么测试uwsgi并发量_nginx + uWSGI 为 django 提供高并发
  7. linux7重装linux6,CentOS6远程重装7过程
  8. 电子计算机发展为第五代,电子计算机的发展历程是怎样的?
  9. C#.NET学习笔记11,12---布尔表达式2组合,if语句
  10. install numpy for arm64
  11. unity 如何获取到屏幕中间_【Unity】屏幕空间位置变换到世界空间位置的方法
  12. Sass 基本特性-基础 笔记
  13. 火山PC编辑框组件详解2
  14. 如何在Windows命令行窗口复制和粘贴?
  15. V831基础-UART
  16. FAST-LIO2.0代码解析(一)preprocess.h
  17. 蚂蚁全媒体中心刘鑫炜:从李子柒看如何打造成功的个人品牌形象
  18. 【Java】IntellIDEA软件的安装
  19. 惠普笔记本无法调节亮度解决办法【成功解决记录贴】
  20. Go 每日一库之 gorilla/handlers

热门文章

  1. 浮动层图片鼠标指针移到自动放大
  2. js正则验证方法大全
  3. bootstrap源码之滚动监听组件scrollspy.js详解
  4. python实现简单的百度翻译
  5. MySQL 开启远程访问权限 | 宝塔系统
  6. Java集合之TreeMap源码解析上篇
  7. 64位CentOS6.2安装erlang及rabbitmqServer
  8. Iptables入门教程
  9. 求质数算法的N种境界 (N 10) zz
  10. php 处理 mysql to json, 前台js处理