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.pswp.cn/news/376988.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/376988.shtml
英文地址,請注明出處:http://en.pswp.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…