OS
在單一處理器系統裡,同一時間只能有一個行程在執行,多元程式規劃(multiprogramming)的目的就是隨時保有一個行程在執行
行程是由CPU執行時間及I/O等待時間所組成的週期(cycle)
CPU分割統計,一般都為指數或超指數型,這個分布方式對於選取一個適當的CPU排班演算法來說是一項非常重要的資料
短程排班程式/CPU排班程式(short-term scheduler):自記憶體中準備要執行的行程中選出一個,將CPU配置給它
CPU排班的決策發生在下面四種狀況
上述四種狀況為不可搶先(nonpreemptive)/合作(cooperative)
可搶先排班(preemptive)
分派程式(dispatcher)
CPU使用率(CPU utilization):使CPU盡可能的忙碌
產量(Throughput):單位時間內所完成的數量
回復時間(Turnaround time):行程完成所花費的時間,包括:進入等待記憶體、就緒佇列等待、CPU執行、I/O等等
等候時間(waiting time):在就緒佇列等待的時間
反應時間(response time):提出一個要求到第一個反應的時間
最佳化
先來先做(FCFS,First-Come First-Served):
最短工作先做(SJF,Shortest-Job-First)
優先權排班(Priority Scheduling)
依序循環(RR,Round Robin)
多層佇列(Multilevel Queue)
多層回饋佇列(Multilevel Feedback Queue)
分析式評估(analytic evaluation):使用所給予演算法和系統工作量產生一個公式或數字,以此評估性能
定量模式(deterministic modeling):一種分析式評估,取一個特定的工作量,並針對每種演算法評估效能
佇列模式(Queueing Models)
模擬(Simulations)
實做(Implementation)
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing