fcfs调度算法_FCFS:先来先服务调度算法
fcfs調(diào)度算法
The FCFS, which stands for First Come First Serve Scheduling Algorithm, is a non-preemptive scheduling algorithm, which means that if a process once starts executing in the processor, then it cannot be preempted in between the processing. Thus, the concept of priority and urgency is not implemented by this type of algorithm. In the FCFS algorithm, the process gets executed in the same sequence in which they enter the Ready state. It simply follows the strategy of "First come First serve with special services provided to none."
FCFS代表先來(lái)先服務(wù)調(diào)度算法 ,是一種非搶先調(diào)度算法,這意味著,如果某個(gè)進(jìn)程一旦開(kāi)始在處理器中執(zhí)行,則無(wú)法在進(jìn)程之間搶占該進(jìn)程。 因此,這種算法無(wú)法實(shí)現(xiàn)優(yōu)先級(jí)和緊急度的概念。 在FCFS算法中,進(jìn)程以進(jìn)入就緒狀態(tài)的順序執(zhí)行。 它只是遵循“先到先得,不提供特殊服務(wù)”的策略。
Now let us try to understand this further with the help of an example. Suppose there are four processes with process ID's P1, P2, P3, and P4 and they enter into the CPU as follows:
現(xiàn)在,讓我們嘗試借助示例進(jìn)一步了解這一點(diǎn)。 假設(shè)有四個(gè)進(jìn)程ID為P1 , P2 , P3和P4 ,它們按如下方式進(jìn)入CPU:
| P1 | 0 | 5 |
| P2 | 2 | 3 |
| P3 | 6 | 2 |
| P4 | 7 | 3 |
| P1 | 0 | 5 |
| P2 | 2 | 3 |
| P3 | 6 | 2 |
| P4 | 7 | 3 |
So, if the OS follows the FCFS algorithm for scheduling these processes, then they will be executed in the following manner:
因此,如果操作系統(tǒng)遵循FCFS算法來(lái)調(diào)度這些進(jìn)程,則將以以下方式執(zhí)行它們:
Gant Chart:
甘特圖:
Total Turn around Time = 5 + 6 + 4 + 6= 21 millisecondsAverage Turn Around Time= Total Turn Around Time / Total No. of Processes= 21 / 4= 5.25 millisecondsTotal Waiting Time = 0 + 3 + 2 + 3= 8 millisecondsAverage Waiting Time = Total Waiting Time / Total No. of Processes= 8 / 4= 2 milliseconds翻譯自: https://www.includehelp.com/operating-systems/fcfs-first-come-first-serve-scheduling-algorithm.aspx
fcfs調(diào)度算法
總結(jié)
以上是生活随笔為你收集整理的fcfs调度算法_FCFS:先来先服务调度算法的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 杭州看无精症最好的医院推荐
- 下一篇: 关系代数基本运算_关系代数的基本和附加运