Merge 1d5dd3f913aafe8a9bcbba07f1f9d2e5e1758644 into 9b38e19bdb2c95e11a75208ea3599a34b09a8f9f
This commit is contained in:
commit
a4fbab6052
@ -151,13 +151,13 @@
|
|||||||
|
|
||||||
## 进程与线程
|
## 进程与线程
|
||||||
|
|
||||||
### 1. 进程
|
### 1. 进程 (process)
|
||||||
|
|
||||||
进程是操作系统进行资源分配的基本单位。
|
进程是操作系统进行资源分配的基本单位。
|
||||||
|
|
||||||
进程控制块 (Process Control Block, PCB) 描述进程的基本信息和运行状态,所谓的创建进程和撤销进程,都是指对 PCB 的操作。
|
进程控制块 (Process Control Block, PCB) 描述进程的基本信息和运行状态,所谓的创建进程和撤销进程,都是指对 PCB 的操作。
|
||||||
|
|
||||||
### 2. 线程
|
### 2. 线程 (thread)
|
||||||
|
|
||||||
一个进程中可以有多个线程,线程是独立调度的基本单位。
|
一个进程中可以有多个线程,线程是独立调度的基本单位。
|
||||||
|
|
||||||
@ -207,7 +207,13 @@ shortest job first(SJF)。
|
|||||||
|
|
||||||
#### 1.3 最短剩余时间优先
|
#### 1.3 最短剩余时间优先
|
||||||
|
|
||||||
shortest remaining time next(SRTN)。
|
shortest remaining time next(SRTN)。This is a preemptive version of the previous one, in which the scheduler always dispatches that ready process which has the shortest expected remaining time to completion. The dispatching decison is always made when a new process is submitted: the currently running process has obviously a smaller remaining time than all other ready ones, otherwise it wouldn't have been dispatched. But a newly submitted job may have an even shorter one, in which case the currently running one would be blocked and put in ready state.
|
||||||
|
|
||||||
|
This decreases the average turnaround time with respect to SPN, since short, newly arrived processes are given immediate attention, if their expected completion time happens to be less than the remaining time to completion of the currently running and ready processes. As with SPN, there's a risk of starvation for long processes, in presence of a constat supply of short ones.
|
||||||
|
|
||||||
|
Since all preemption decision are made only either upon a new process submission or when a process completes, there's less overhead involved than with RR
|
||||||
|
|
||||||
|
\ref{https://www.cim.mcgill.ca/~franco/OpSys-304-427/lecture-notes/node44.html}
|
||||||
|
|
||||||
### 2. 交互式系统中的调度
|
### 2. 交互式系统中的调度
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user