最短剩余时间调度算法_LRTF:最长剩余时间优先调度算法
最短剩余時間調度算法
LRTF, which stands for Longest Remaining Time First is a scheduling Algorithm used by the operating system to schedule the incoming processes so that they can be executed in a systematic way. This algorithm schedules those processes first which have the longest processing time remaining for completion. This algorithm can also be called as the preemptive version of the LJF scheduling algorithm. However, like the LJF, this algorithm is also not.
LRTF代表最長剩余時間優先,是一種調度算法,操作系統使用它來調度傳入的進程,以便可以系統地執行它們。 該算法首先調度那些剩余的處理時間最長的進程。 該算法也可以稱為LJF調度算法的搶占版本。 但是,與LJF一樣 ,該算法也不是。
Let us take an example to understand it further. Suppose there are three processes with process Id's P1, P2, P3, and P4, and they have the following details:
讓我們舉個例子來進一步理解它。 假設存在三個進程Id為P1,P2,P3和P4的進程,它們具有以下詳細信息:
Gant Chart:
甘特圖:
Explanation: Each cell under the columns P1, P2, P3, and P4 denotes the remaining time required by that process for being completed.
說明:列P1 , P2 , P3和P4下的每個單元格表示該過程完成所需的剩余時間。
Note: Here, after all the process are left at the same time, then the execution order depends upon the arrival time. The process which has arrived first will be executed first in such cases.
注意:在此,所有進程同時離開后,執行順序取決于到達時間。 在這種情況下,將首先執行最先到達的過程。
Calculations:
計算:
Total Turn Around Time = 9 + 9 + 7 + 7= 32 millisecondsAverage Turn Around Time= Total Turn Around Time / Total No. of Processes= 32 / 4= 8 millisecondsTotal Waiting Time = 7 + 4 + 4 + 5= 20 millisecondsAverage Waiting Time = Total Waiting Time / Total No. of Processes= 20 / 4= 5 millisecondsNote: It can be observed that in spite of having much less burst time of each process, the average waiting time and average turn-around time is much high.
注意:可以看出,盡管每個過程的突發時間都少得多,但平均等待時間和平均周轉時間仍然很高。
翻譯自: https://www.includehelp.com/operating-systems/lrtf-longest-remaining-time-first-scheduling-algorithm.aspx
最短剩余時間調度算法
總結
以上是生活随笔為你收集整理的最短剩余时间调度算法_LRTF:最长剩余时间优先调度算法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: TM1638芯片 LED数码管驱动器 详
- 下一篇: 目前人工智能技术在医疗领域的应用,主要集