Disk Scheduling(磁盘调度) 1.First Come,First Served(FCFS,先来先服务) The simplest form of scheduling 014 37536567 98122124 183199 head start:53 Total head movement =(h-h-1) =198-5+1183-98 +37-183+122-371 +114-122+1124-14 +65-124+167-6问 =640 request queue=98,183.37.122,14,124,65,67 4口”484在4色,主月QC
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Disk Scheduling (磁盘调度) 1. First Come, First Served (FCFS, 先来先服务) ▶ The simplest form of scheduling 0 14 37 53 6567 98 122124 183 199 head start: 53 Total head movement = Σ (hi − hi−1 ) = |98 − 53| + |183 − 98| + |37 − 183| + |122 − 37| + |14 − 122| + |124 − 14| + |65 − 124| + |67 − 65| = 640 b b b b b b b b request queue = 98, 183, 37, 122, 14, 124, 65, 67
Disk Scheduling(磁盘调度) 2.SSTF(shortest-seek-time-first) Selects the request with the minimum seek time from the current head position. 01437536567 98122124 183199 head start 53 Total head movement =(h-hi1) =65-53+167-6同 +37-67可+μ4-37 +98-14+1122-98 +124-12+1183-124 =236 request queue=98,183,37.122,14,124,65,67 SSTF≈SJF:starvation 4口”484在4色主)QC
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Disk Scheduling (磁盘调度) 2. SSTF (shortest-seek-time-first) ▶ Selects the request with the minimum seek time from the current head position. 0 14 37 53 6567 98 122124 183 199 head start: 53 Total head movement = Σ (hi − hi−1 ) =|65 − 53| + |67 − 65| + |37 − 67| + |14 − 37| + |98 − 14| + |122 − 98| + |124 − 12| + |183 − 124| =236 b b b b b b b b request queue = 98, 183, 37, 122, 14, 124, 65, 67 ▶ SSTF≈SJF : starvation