mirror of
https://github.com/CyC2018/Interview-Notebook.git
synced 2026-10-29 15:13:44 +00:00
Update 计算机操作系统 - 设备管理.md
重新绘制配图,补充磁盘调度的示例。
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 109 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 112 KiB |
@@ -22,6 +22,8 @@
|
||||
|
||||
## 磁盘调度算法
|
||||
|
||||
下面的例子中,磁头当前位于 50 号磁道,按到达顺序有 72、30、95、56、12、81、44 七个请求。先来先服务按这个顺序移动,共移动 318 个磁道。
|
||||
|
||||
读写一个磁盘块的时间的影响因素有:
|
||||
|
||||
- 旋转时间(主轴转动盘面,使得磁头移动到适当的扇区上)
|
||||
@@ -46,7 +48,7 @@
|
||||
|
||||
虽然平均寻道时间比较低,但是不够公平。如果新到达的磁道请求总是比一个在等待的磁道请求近,那么在等待的磁道请求会一直等待下去,也就是出现饥饿现象。具体来说,两端的磁道请求更容易出现饥饿现象。
|
||||
|
||||
<div align="center"> <img src="https://cs-notes-1256109796.cos.ap-guangzhou.myqcloud.com/4e2485e4-34bd-4967-9f02-0c093b797aaa.png"/> </div><br>
|
||||
<div align="center"> <img src="pics/disk-sstf.png" width="760px"/> </div><br>
|
||||
|
||||
### 3. 电梯算法
|
||||
|
||||
@@ -58,4 +60,4 @@
|
||||
|
||||
因为考虑了移动方向,因此所有的磁盘请求都会被满足,解决了 SSTF 的饥饿问题。
|
||||
|
||||
<div align="center"> <img src="https://cs-notes-1256109796.cos.ap-guangzhou.myqcloud.com/271ce08f-c124-475f-b490-be44fedc6d2e.png"/> </div><br>
|
||||
<div align="center"> <img src="pics/disk-scan.png" width="760px"/> </div><br>
|
||||
|
||||
Reference in New Issue
Block a user