优先级调度算法动态优先级_与优先级调度有关的问题及其解决方案
優先級調度算法動態優先級
We are already familiar with what Priority Scheduling is. It is one of the most used process scheduling algorithm used in operating systems, in which every process is assigned with a priority. According to this algorithm, the process with the highest priority is set to be provided the CPU first or simply is to be executed first.
我們已經熟悉什么是優先調度。 它是操作系統中使用最廣泛的進程調度算法之一,在該算法中,每個進程都分配了優先級。 根據該算法,將優先級最高的過程設置為首先提供給CPU或簡單地首先執行。
In priority scheduling algorithm, a major problem to be considered is the starvation of a process i.e. a process which is ready to be executed but is waiting for the CPU because of its low priority. This can lead to the indefinite waiting of the low-priority processes. A continuous flow of higher priority processes to the O.S can prevent a low priority process from ever getting the CPU.
在優先級調度算法中 ,要考慮的主要問題是進程的饑餓 ,即由于其低優先級而準備執行但正在等待CPU的進程。 這可能導致無限期等待低優先級進程。 高優先級進程不斷流向OS可以防止低優先級進程獲得CPU。
Let's take an example to understand what starvation is. Suppose there are 100 processes in which a process 'X' has the lowest priority because of which it will be executed at last. Let say before the process 'X' is provided CPU for the execution some more processes are provided to the operating system having a priority higher than that of process 'X'. Now what will happen is, the process 'X' won't get the chance to get executed no matter what was its arrival time. It is possible that, as the time passes by the O.S is given more processes having higher priority than that of 'X', due to which 'X' can wait indefinitely or could never be executed. This Problem is known as 'Starvation'.
讓我們舉一個例子來了解什么是饑餓 。 假設有100個進程,其中進程'X'具有最低優先級,因為它最終將被執行。 可以說,在為CPU提供進程“ X”以供執行之前,向操作系統提供的其他進程的優先級高于進程“ X”的優先級。 現在將要發生的是,無論到達時間是什么,進程“ X”都不會有執行的機會。 隨著時間的流逝,可能會給OS提供更多比'X'具有更高優先級的進程,因此'X'可以無限期等待或無法執行。 這個問題被稱為“饑餓” 。
For solving the problem of starvation we have the concept of Aging. In aging what we do is increasing the priority of those process that has been waiting long because of low priority after some specified amount of time. Due to which after the specified time its priority is increased and could be provided with the CPU for the execution.
為了解決饑餓問題,我們有老齡化的概念。 在老化中,我們要增加由于在指定的時間量后優先級較低而一直等待很久的那些進程的優先級。 因此,在指定的時間之后,其優先級會增加,并且可以隨CPU提供以執行該優先級。
翻譯自: https://www.includehelp.com/operating-systems/problem-associated-with-priority-scheduling-and-its-solution.aspx
優先級調度算法動態優先級
總結
以上是生活随笔為你收集整理的优先级调度算法动态优先级_与优先级调度有关的问题及其解决方案的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 软件工程质量管理体系要求_软件质量管理|
- 下一篇: math.trunc_带有Python示