sjf调度算法_如何通过静态方法预测SJF调度中未来过程的突发时间?

sjf调度算法

In SJF Scheduling, CPU is assigned to the process having the smallest burst time but it can not be implemented practically, because we don't know burst time of the arrived processes in advance.

在SJF Scheduling中 ,将CPU分配给具有最短突发时间的进程,但是由于我们事先不知道到达进程的突发时间,因此它实际上无法实现。

The predicted burst time of the future process may not always be correct because the burst time of a process also depends on the kind of a process.

未来过程的预测突发时间可能并不总是正确的,因为一个过程的突发时间还取决于一个过程的类型。

There are many methods by which we can predict the burst time for the processes,

我们可以通过多种方法来预测过程的爆发时间

  1. Static methods

    静态方法

  2. Dynamic methods

    动态方法

predict the burst time 1

1)静态方法 (1) Static methods)

There are two static factors by we can predict the burst time of processes,

我们可以通过两个静态因素来预测进程的爆发时间,

  1. According to process type

    根据Craft.io类型

  2. According to process size

    根据Craft.io尺寸

predict the burst time 2

i)根据Craft.io类型 (i) According to process type)

In this method, burst time can be predicted according to the type of process,

在这种方法中,可以根据进程类型预测突发时间,

User Process:

用户流程

The Process which is initiated by the users is referred to as user processes. User processes can be of the following types.

由用户发起的过程称为用户过程。 用户进程可以是以下类型。

Foreground process:

前台流程

The processes which are accessed by the user to perform their needs such as MS office, Editors, utility software, calculators, etc are called foreground processes.

用户访问以执行其需求的过程,例如MS Office,编辑器,实用软件,计算器等,称为前台过程。

These types of processes are a perfect mix of CPU and IO bound processes so they have a bit higher burst time.

这些类型的进程是CPU和IO绑定进程的完美结合,因此它们的突发时间要长一些。

Interactive Process:

互动过程

The processes which interact with the user at different time intervals or execution of these processes totally depends on the user inputs are called Interactive Processes. Various games have come in the category of interactive processes.

在不同时间间隔与用户交互的过程或这些过程的执行完全取决于用户的输入,称为交互过程。 各种游戏都属于交互过程类别。

They don't need a processor for a large amount of time. As a result, the burst time of these processes is low. They are mainly IO bound processes because they mainly depend upon the user's interactivity with the process

他们不需要大量时间的处理器。 结果,这些过程的突发时间很短。 它们主要是受IO约束的流程,因为它们主要取决于用户与流程的交互性

Background process:

后台进程

Some processes support the execution of other processes are known as background processes. These processes work in hidden mode. Just like, the key logger is the process that records the keys pressed by the user and activities of the user on the system. These processes need CPU for a large amount of time that’s why they are CPU bound processes.

一些支持其他进程执行的进程称为后台进程。 这些进程以隐藏模式工作。 就像键记录器一样,它是记录用户按下的键和用户在系统上的活动的过程。 这些进程需要大量的CPU时间,这就是它们是受CPU约束的进程的原因。

Operating System Process:

操作系统流程

Operating System Processes can be of different types such as schedulers, compilers, program managers and many more other system processes. Burst time of Operating system process is generally lower approximate 3 to 5 units of time.

操作系统进程可以是不同类型的,例如调度程序,编译器,程序管理器以及更多其他系统进程。 操作系统进程的突发时间通常较低,大约为3到5个单位时间。

ii)根据Craft.io规模 (ii) According to process size)

In this method, burst time can be predicted according to the size of a process.

在这种方法中,可以根据过程的大小预测突发时间。

Here, the burst time is taken similar to the currently running process and the newly arrived process that is to be executed.

在此,突发时间类似于当前正在运行的进程以及将要执行的新到达进程。

For example, suppose a size currently running process (Pold) is 150 KB and it takes 10 units of time for its execution.

例如,假设当前正在运行的进程(Pold)大小为150 KB,并且执行该进程需要10个时间单位。

So, the burst time for any newly arrived process of size around 150 KB can be taken as 10 units of time.

因此,任何大小约为150 KB的新到达进程的突发时间都可以视为10个时间单位。

References:

参考文献:

  • Prediction of CPU Burst Time for a process in SJF

    SJF中进程的CPU突发时间的预测

  • Predicting Burst Time | SJF Scheduling

    预测爆发时间 SJF计划

  • Shortest job next

    接下来最短的工作

翻译自: https://www.includehelp.com/operating-systems/how-can-be-predict-the-burst-time-of-future-process-in-sjf-scheduling-by-static-method.aspx

sjf调度算法

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/376988.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

flask 知识点总结

request对象的常用属性具体使用方法如下:request.headers, request.headers.get(If-None-Match)request.json, request.json[value] 或 request.json.get(detail_msg, "")request.args, request.args.get(limit, 10)来获取query parametersrequest.form, request.for…

Postgresql中的hybrid hash join(无状态机讲解)

hybrid hash join hybrid hash join是基于grace hash join 的优化。 在postgresql中的grace hash join 是这样做的:inner table太大不能一次性全部放到内存中,pg会把inner table 和outer table按照join的key分成多个分区,每个分区(有一个inn…

末日中的黎明

哈哈, 今天是2012-12-21,传说中的世界末日,不过现在看来,一切都是空的。。。 在这个容易记忆的日子里,我的博客开通了。他将伴随我以后的学习开发,期望我能充分利用博客,帮我养成常总结、常记笔…

使用numpy.tanh()打印矢量/矩阵元素的双曲正切值 使用Python的线性代数

Prerequisite: 先决条件: Defining a Vector 定义向量 Defining a Matrix 定义矩阵 Numpy is the library of function that helps to construct or manipulate matrices and vectors. The function numpy.tanh(x) is a function used for generating a matrix / v…

Mahout kmeans聚类

Mahout K-means聚类 一、Kmeans 聚类原理 K-means算法是最为经典的基于划分的聚类方法,是十大经典数据挖掘算法之一。K-means算法的基本思想是:以空间中k个点为中心进行聚类,对最靠近他们的对象归类。通过迭代的方法,逐次更新各聚…

Web项目中获取SpringBean——在非Spring组件中获取SpringBean

最近在做项目的时候我发现一个问题:Spring的IOC容器不能在Web中被引用(或者说不能被任意地引用)。我们在配置文件中让Spring自动装配,但并没有留住ApplicationContext的实例。我们如果希望在我们的项目中任何位置都能拿到同一个ApplicationContext来获取…

postgresql对于HashJoin算法的Data skew优化与MCV处理

Data skew 很好理解,即数据倾斜。现实中的数据很多都不是正态分布的,譬如城市人口,东部沿海一个市的人口与西部地区一个市地区的人口相比,东部城市人口会多好几倍。 postgresql的skew的优化核心思想是"避免磁盘IO"。 优…

JavaScript | 创建对象并通过JavaScript函数在表中显示其内容

In this example, we created an object named employee with id, name, gender, city, and salary and assigned and displaying the values in the table using JavaScript function. 在此示例中,我们创建了一个名为employee的对象,其对象为id &#x…

基于socket的简单文件传输系统

【实验目的及要求】 在 Uinx/Linux/Windows 环境下通过 socket 方式实现一个基于 Client/Server 文件传输程序。 【实验原理和步骤】 1. 确定传输模式:通过 socket 方式实现一个基于 Client/Server 或 P2P 模式的文件传输程序。 2. 如果选择的是 Client/Server 模式的文件传输…

《GPU高性能编程-CUDA实战》中例子头文件使用

《GPU高性能编程-CUDA实战(CUDA By Example)》中例子中使用的一些头文件是CUDA中和C中本身没有的,需要先下载这本书的源码,可以在:https://developer.nvidia.com/content/cuda-example-introduction-general-purpose-g…

mcq 队列_人工智能| AI解决问题| 才能问题解答(MCQ)| 套装1

mcq 队列1) Which of the following definitions correctly defines the State-space in an AI system? A state space can be defined as the collection of all the problem statesA state space is a state which exists in environment which is in outer spaceA state sp…

Postgresql的HashJoin状态机流程图整理

状态机 可以放大观看。 HashJoinState Hash Join运行期状态结构体 typedef struct HashJoinState {JoinState js; /* 基类;its first field is NodeTag */ExprState *hashclauses;//hash连接条件List *hj_OuterHashKeys; /* 外表条件链表;list of …

Ajax和Jsonp实践

之前一直使用jQuery的ajax方法,导致自己对浏览器原生的XMLHttpRequest对象不是很熟悉,于是决定自己写下,以下是个人写的deom,发表一下,聊表纪念。 Ajax 和 jsonp 的javascript 实现: /*! * ajax.js * …

得到前i-1个数中比A[i]小的最大值,使用set,然后二分查找

题目 有一个长度为 n 的序列 A&#xff0c;A[i] 表示序列中第 i 个数(1<i<n)。她定义序列中第 i 个数的 prev[i] 值 为前 i-1 个数中比 A[i] 小的最大的值&#xff0c;即满足 1<j<i 且 A[j]<A[i] 中最大的 A[j]&#xff0c;若不存在这样的数&#xff0c;则 pre…

学习语言贵在坚持

学习语言贵在坚持 转自&#xff1a;http://zhidao.baidu.com/link?urlr2W_TfnRwipvCDLrhZkATQxdrfghXFpZhkLxqH1oUapLOr8jXW4tScbyOKRLEPVGCx0dUfIr-30n9XV75pWYfK给大家介绍几本书和别处COPY来的学习C50个观点 《Thinking In C》&#xff1a;《C编程思想》&#xff1b; 《The…

stl vector 函数_在C ++ STL中使用vector :: begin()和vector :: end()函数打印矢量的所有元素...

stl vector 函数打印向量的所有元素 (Printing all elements of a vector) To print all elements of a vector, we can use two functions 1) vector::begin() and vector::end() functions. 要打印矢量的所有元素&#xff0c;我们可以使用两个函数&#xff1a;1) vector :: b…

JqueryUI入门

Jquery UI 是一套开源免费的、基于Jquery的插件&#xff0c;在这里记录下Jquery UI 的初步使用。 第一、下载安装 下载Jquery,官网&#xff1a;http://jquery.com;  下载Jquery UI&#xff0c;官网&#xff1a;http://jqueryui.com/ Jquery的部署就不说了&#xff0c;说下Jqu…

gp的分布、分区策略(概述)

对于大规模并行处理数据库来说&#xff0c;一般由单master与多segment组成。 那么数据表的单行会被分配到一个或多个segment上&#xff0c;此时需要想一想分布策略 分布 在gp6中&#xff0c;共有三个策略&#xff1a; 哈希分布 随机分布 复制分布 哈希分布 就是对分布键进行…

[ Java4Android ] Java基本概念

视频来自&#xff1a;http://www.marschen.com/ 1.什么是环境变量 2.JDK里面有些什么&#xff1f; 3.什么是JRE&#xff1f; 什么是环境变量&#xff1f; 1.环境变量通常是指在操作系统当中&#xff0c;用来指定操作系统运行时需要的一些参数; 2.环境变量通常为一系列的键值对&…

_thread_in_vm_Java Thread类的静态void sleep(long time_in_ms,int time_in_ns)方法,带示例

_thread_in_vm线程类静态无效睡眠(long time_in_ms&#xff0c;int time_in_ns) (Thread Class static void sleep(long time_in_ms, int time_in_ns)) This method is available in package java.lang.Thread.sleep(long time_in_ms, int time_in_ns). 软件包java.lang.Thread…