sjf调度算法_如何通过静态方法预测SJF调度中未来过程的突发时间?
sjf調(diào)度算法
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分配給具有最短突發(fā)時(shí)間的進(jìn)程,但是由于我們事先不知道到達(dá)進(jìn)程的突發(fā)時(shí)間,因此它實(shí)際上無(wú)法實(shí)現(xiàn)。
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.
未來(lái)過(guò)程的預(yù)測(cè)突發(fā)時(shí)間可能并不總是正確的,因?yàn)橐粋€(gè)過(guò)程的突發(fā)時(shí)間還取決于一個(gè)過(guò)程的類型。
There are many methods by which we can predict the burst time for the processes,
我們可以通過(guò)多種方法來(lái)預(yù)測(cè)過(guò)程的爆發(fā)時(shí)間 ,
Static methods
靜態(tài)方法
Dynamic methods
動(dòng)態(tài)方法
1)靜態(tài)方法 (1) Static methods)
There are two static factors by we can predict the burst time of processes,
我們可以通過(guò)兩個(gè)靜態(tài)因素來(lái)預(yù)測(cè)進(jìn)程的爆發(fā)時(shí)間,
According to process type
根據(jù)Craft.io類型
According to process size
根據(jù)Craft.io尺寸
i)根據(jù)Craft.io類型 (i) According to process type)
In this method, burst time can be predicted according to the type of process,
在這種方法中,可以根據(jù)進(jìn)程類型預(yù)測(cè)突發(fā)時(shí)間,
User Process:
用戶流程 :
The Process which is initiated by the users is referred to as user processes. User processes can be of the following types.
由用戶發(fā)起的過(guò)程稱為用戶過(guò)程。 用戶進(jìn)程可以是以下類型。
Foreground process:
前臺(tái)流程 :
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.
用戶訪問(wèn)以執(zhí)行其需求的過(guò)程,例如MS Office,編輯器,實(shí)用軟件,計(jì)算器等,稱為前臺(tái)過(guò)程。
These types of processes are a perfect mix of CPU and IO bound processes so they have a bit higher burst time.
這些類型的進(jìn)程是CPU和IO綁定進(jìn)程的完美結(jié)合,因此它們的突發(fā)時(shí)間要長(zhǎng)一些。
Interactive Process:
互動(dòng)過(guò)程 :
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.
在不同時(shí)間間隔與用戶交互的過(guò)程或這些過(guò)程的執(zhí)行完全取決于用戶的輸入,稱為交互過(guò)程。 各種游戲都屬于交互過(guò)程類別。
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
他們不需要大量時(shí)間的處理器。 結(jié)果,這些過(guò)程的突發(fā)時(shí)間很短。 它們主要是受IO約束的流程,因?yàn)樗鼈冎饕Q于用戶與流程的交互性
Background process:
后臺(tái)進(jìn)程 :
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.
一些支持其他進(jìn)程執(zhí)行的進(jìn)程稱為后臺(tái)進(jìn)程。 這些進(jìn)程以隱藏模式工作。 就像鍵記錄器一樣,它是記錄用戶按下的鍵和用戶在系統(tǒng)上的活動(dòng)的過(guò)程。 這些進(jìn)程需要大量的CPU時(shí)間,這就是它們是受CPU約束的進(jìn)程的原因。
Operating System Process:
操作系統(tǒng)流程 :
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.
操作系統(tǒng)進(jìn)程可以是不同類型的,例如調(diào)度程序,編譯器,程序管理器以及更多其他系統(tǒng)進(jìn)程。 操作系統(tǒng)進(jìn)程的突發(fā)時(shí)間通常較低,大約為3到5個(gè)單位時(shí)間。
ii)根據(jù)Craft.io規(guī)模 (ii) According to process size)
In this method, burst time can be predicted according to the size of a process.
在這種方法中,可以根據(jù)過(guò)程的大小預(yù)測(cè)突發(fā)時(shí)間。
Here, the burst time is taken similar to the currently running process and the newly arrived process that is to be executed.
在此,突發(fā)時(shí)間類似于當(dāng)前正在運(yùn)行的進(jìn)程以及將要執(zhí)行的新到達(dá)進(jìn)程。
For example, suppose a size currently running process (Pold) is 150 KB and it takes 10 units of time for its execution.
例如,假設(shè)當(dāng)前正在運(yùn)行的進(jìn)程(Pold)大小為150 KB,并且執(zhí)行該進(jìn)程需要10個(gè)時(shí)間單位。
So, the burst time for any newly arrived process of size around 150 KB can be taken as 10 units of time.
因此,任何大小約為150 KB的新到達(dá)進(jìn)程的突發(fā)時(shí)間都可以視為10個(gè)時(shí)間單位。
References:
參考文獻(xiàn):
Prediction of CPU Burst Time for a process in SJF
SJF中進(jìn)程的CPU突發(fā)時(shí)間的預(yù)測(cè)
Predicting Burst Time | SJF Scheduling
預(yù)測(cè)爆發(fā)時(shí)間 SJF計(jì)劃
Shortest job next
接下來(lái)最短的工作
翻譯自: https://www.includehelp.com/operating-systems/how-can-be-predict-the-burst-time-of-future-process-in-sjf-scheduling-by-static-method.aspx
sjf調(diào)度算法
總結(jié)
以上是生活随笔為你收集整理的sjf调度算法_如何通过静态方法预测SJF调度中未来过程的突发时间?的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 寻人大师3剧情介绍
- 下一篇: 极米投影仪 哪里生产的