操作系统 系统开销比率

操作系统中的HRRN调度是什么? (What is HRRN Scheduling in Operating System?)

  • HRRN is the abbreviation of Highest Response Ratio Next Scheduling. It is an optimal scheduling algorithm.

    HRRN是最高响应率下一个调度的缩写 。 这是一种最佳的调度算法。

  • It is non-preemptive scheduling algorithm that means if there is any process currently executing with the CPU and if a new process arrives in the memory and its burst time is smaller than the currently running process then currently running process will not be put in the ready queue and it can complete its execution without any interruption.

    这是一种非抢占式调度算法,这意味着如果CPU当前正在执行任何进程,并且如果有新进程到达内存,并且其突发时间小于当前正在运行的进程,那么当前正在运行的进程将不会处于就绪状态队列,它可以完成其执行而不会受到任何干扰。

  • Non-preemptive scheduling algorithms are designed so that once a process starts its execution, it cannot be preempted until it completes its allotted time.

    非抢占式调度算法的设计宗旨是,一旦一个进程开始执行,就无法抢占该进程,直到它完成其分配的时间。

  • It is the modification of shortest job next (SJN) to mitigate the problem of process starvation.

    这是最短作业下一个(SJN)的修改,以减轻过程不足的问题。

  • In this scheduling algorithm assign the CPU to the next process which has the highest response ratio not according to the shortest burst time.

    在此调度算法中,不根据最短的突发时间将CPU分配给响应率最高的下一个进程。

算法 (Algorithm)

  • This scheduling is done based on the response ratio. Response ratio can be calculated with arrival time, waiting time and CPU burst time.

    该调度是基于响应率来完成的。 响应率可以通过到达时间,等待时间和CPU突发时间来计算。

        Response Ratio = (W+S)/S  Where, W= waiting timeS= Burst time 
    
  • In this scheduling, once a process selected for execution then it will run until its completion.

    在此调度中,一旦选择要执行的进程,它将一直运行到完成为止。

  • First, we have to calculate the waiting time for all the processes. The sum of the periods spent waiting in the ready queue is referred to as waiting time.

    首先,我们必须计算所有流程的等待时间。 在就绪队列中等待所花费的时间之和称为等待时间。

  • Each time processes get scheduled for execution to find response ratio for each available process.

    每次安排执行进程的时间,以查找每个可用进程的响应率。

  • Process having shortest response ratio will be executed first by the processor.

    响应率最短的处理将首先由处理器执行。

  • If two processes have the same response ratio then break the tie using the FCFS scheduling algorithm.

    如果两个进程的响应率相同,则使用FCFS调度算法打破平局。

Example:

例:

Here is an example of HRRN Scheduling given arrival time and burst or service time of each process,

这是给定每个进程的到达时间和突发或服务时间的HRRN调度示例

Solution:

解:

Explanation:

说明:

  • At time t = 0, only the process P0 is available in the ready queue. So, process P0 executes till its completion.

    在时间t = 0时,就绪队列中只有进程P0可用。 因此,过程P0一直执行到完成为止。

  • At time t = 4, only the process P1 and P2 are available in the ready queue. So, we have to calculate the response ratio.

    在时间t = 4时,就绪队列中仅进程P1和P2可用。 因此,我们必须计算响应率。

  • The process which has the highest response ratio will be executed next.

    接下来将执行响应率最高的过程。

  • Response Ratio are,

    回应率是

        RR (P1) = [(4 - 3) + 3] / 3 = 1.40RR (P2) = [(4 - 3) + 3] / 3 = 0.75
    
  • Process P1 has highest response ratio so it will selected for execution.

    进程P1的响应率最高,因此将选择执行。

  • After the completion of execution of process P1, there are three processes P2, P3 and P4 are in the ready queue.

    在完成过程P1的执行之后,就绪队列中有三个过程P2,P3和P4。

  • So, the Response Ratio for processes P2, P3 and P4 are,

    因此,过程P2,P3和P4的响应率是

        RR (P2) = [(9 - 4) + 3] / 3 = 2.66RR (P3) = [(9 - 6) + 6] / 6 = 1.50RR (P4) = [(9 - 8) + 3] / 3 = 1.33
    
  • Process P2 has highest response ratio so it will selected for execution.

    进程P2的响应率最高,因此将选择执行。

  • After the completion of execution of process P2, there are three processes P3 and P4 are in the ready queue.

    在完成过程P2的执行之后,在准备队列中有三个过程P3和P4。

  • So, the Response Ratio for processes P3 and P4 are,

    因此,过程P3和P4的响应率是

        RR (P3) = [(12 - 6) + 6] / 6 = 2RR (P4) = [(12 - 8) + 3] / 3 = 2.33
    
  • Process P4 has highest response ratio so it will be executed next.

    进程P4的响应率最高,因此将在下一步执行。

  • After the completion of the execution of process P4, there are only process P3 in the ready queue. So, it will be executed next.

    在完成过程P4的执行之后,就绪队列中只有过程P3。 因此,将在下一个执行。

Advantages

优点

  • Its performance is better than SJF Scheduling.

    它的性能优于SJF计划 。

  • It limits the waiting time of longer jobs and also supports shorter jobs.

    它限制了较长工作的等待时间,也支持较短的工作。

Disadvantages

缺点

  • It can't be implemented practically.

    它实际上无法实现。

  • This is because the burst time of all the processes can not be known in advance.

    这是因为无法预先知道所有进程的突发时间。

翻译自: https://www.includehelp.com/operating-systems/highest-response-ratio-next-hrrn-scheduling.aspx

操作系统 系统开销比率

操作系统 系统开销比率_操作系统中的最高响应比率下一个(HRRN)调度相关推荐

  1. 操作系统文件分配策略_操作系统中的文件分配方法

    操作系统文件分配策略 分配方法 (Allocation Method) The allocation method defines how the files are stored in the di ...

  2. 操作系统饥饿现象_操作系统常见面试题

    1.进程的常见状态?以及各种状态之间的转换条件? 就绪:进程已处于准备好运行的状态,即进程已分配到除CPU外的所有必要资源后,只要再获得CPU,便可立即执行. 执行:进程已经获得CPU,程序正在执行状 ...

  3. 操作系统饥饿现象_操作系统心得体会

    一.操作系统 1.基本概念 操作系统简称OS,是配置在计算机硬件上的第一层软件,它能够有效的组织和管理计算机系统中的硬件和软件资源,合理的组织计算机工作流程,控制程序的执行,并向用户提供各种服务功能. ...

  4. 给定数字的b+树创建_在C ++中找到给定数字中的两个的下一个和上一个幂

    给定数字的b+树创建 Problem statement: 问题陈述: Find Next and previous power of two of a given number 查找给定数字中两个的 ...

  5. 操作系统多线程实现_操作系统中的线程实现

    操作系统多线程实现 Each process has an address space. There is one thread of control in every traditional OS. ...

  6. 操作系统饥饿现象_操作系统中的饿死现象怎样理解?

    什么是进程的饥饿和饿死? 在一个动态系统中,资源请求与释放是经常性发生的进程行为.对于每类系统资源,操作系统需要确定一个分配策略,当多个进程同时申请某类资源时,由分配策略确定资源分配给进程的次序. 资 ...

  7. 操作系统内存管理_操作系统6内存管理基础

    引言 花了一段时间才把之前的笔记整理了一部分,平时太忙也没啥时间.今天开始整理内存管理部分的,内存管理部分大致分为三部分笔记,第一部分就是本篇内存管理基础,第二部分是虚拟内存,第三部分高速缓存. 一个 ...

  8. 操作系统饥饿现象_操作系统复习

    的最小值是 ( ) A . 2 B.3 C.4 D.5 4.n 个进程共享某一临界资源,则互斥信号量的取值范围为( ) . A. 0~1     B. – 1~0            C. 1~-( ...

  9. python操作系统课程设计_操作系统课程设计.pdf

    计算机科学与通信工程学院 操作系统课程设计报告 题目:linux系统下实现PV 操作 班级: 软件工程1401 姓名: 吴帅帅 学号: 3140608020 指导老师: 牛德姣 2016 年12 月2 ...

最新文章

  1. “深度学习”这十年:52篇大神级论文再现AI荣与光
  2. C# 中Excel导出,可以自由设置导出的excel格式
  3. android getitem,android – ItemDecoration重写getItemOffsets()和动画
  4. Java OpenCV-4.0.0 图像处理22 图像模板匹配
  5. 三重积分平均值_2015考研数学考前必须死磕的知识点
  6. 利用IDEA创建hadoop文件
  7. flash人物原地走路,Flash制作小人走路简单动画图文教程
  8. 产业链人士:存储芯片平均售价有望在明年一季度停止下滑 随后趋于稳定
  9. python用一行代码编写一个回声程序_Python源码分析2 - 一个简单的Python程序的执行...
  10. 现代优化计算方法_【公开课】供应链库存优化与需求预测管理
  11. spring教程笔记3
  12. 13个不容错过的Java项目
  13. 10:Java人脸识别认证-Java API 实战
  14. PICT-测试用例生成工具
  15. atmega328p引脚图_【ATMEGA328P-PU PDF数据手册】_中文资料_引脚图及功能_(爱特美尔 ATMEL)-采芯网...
  16. 学海无涯——人工智能应用实例之写作软件的基本概念
  17. JDK1.8 下载及安装步骤
  18. static关键字的用法
  19. Win10 锁屏之后无法唤起 出现假死解决办法
  20. 使用 Underminer Studios 的 MR 配置器工具制作现实混合虚拟现实视频

热门文章

  1. linux内核配置usb虚拟串口,Linux USB虚拟串口设备
  2. mysql sqlserver schema_MySQL数据库数据迁移到SQLserver
  3. 网络工程属于计算机哪一类,网络工程专业属于什么门类
  4. 马秀丽C语言程序设计答案pdf,C语言程序设计清华大学马秀丽刘志妩科后习题9答案.doc...
  5. mysql联合查询语句详解_实例讲解MySQL联合查询
  6. 前端解读控制反转(IOC)
  7. html/css学习笔记(一)
  8. 《Web前端开发修炼之道》-读书笔记CSS部分
  9. eureka-7-多网卡下的ip选择
  10. windows中当你的键盘无法使用时我们可以用另一种方法哦