Document not found! Please try again

Disk Scheduling with Dynamic Request Priorities - Semantic Scholar

7 downloads 296 Views 228KB Size Report
In this paper, we present a priority inversion disk scheduling algorithm where both priority and ... N-step SCAN behaves like SCAN except that it services only those requests waiting .... We call the previous priority inversion algorithm a greedy algorithm. ..... In Proc. of the Third International Conference on Software Engi-.
Disk Scheduling with Dynamic Request Priorities Yongcheng Li

See-Mong Tan

Zhigang Chen

Roy H. Campbell

Department of Computer Science University of Illinois at Urbana-Champaign Digital Computer Laboratory 1304 W. Spring eld Urbana, IL 61801 fycli,stan,zchen,[email protected]

High performance servers in client/server distributed systems must manage and multiplex disk I/O resources eciently and fairly between multiple clients. In digital multimedia systems, clients may make requests of varying urgencies. The traditional approach to this problem thus assigns priorities to disk requests. High priority requests are scheduled rst, with low priority requests served only when the high priority queue is empty. While this approach permits priority optimization, it ignores seek optimization. When the length of the high priority queue is short compared to the low priority queue, disk utilization is very low. In this paper, we present a priority inversion disk scheduling algorithm where both priority and seek optimization are considered. The algorithm is evaluated through detailed simulation and its performance is compared with traditional scheduling algorithms. We then identi ed the conditions when our algorithm performs better. The simulation results show that under these conditions, we achieve close to 50% reduction in total system response time. Based on this, an adaptive disk scheduling algorithm was constructed which consistenly outperforms the traditional approach. 1

1 Introduction High performance servers in client/server distributed systems must manage and multiplex disk I/O resources eciently and fairly between multiple clients. The high number of requests in very large scale distributed information systems, such as World Wide Web servers for popular sites, or other digital library systems, impose a heavy load on the storage and I/O subsystems. The load condition also varies considerably over time. In addition, busy multimedia servers of the future must handle requests of di erent priorities. File requests which need disk I/O access require appropriate disk scheduling algorithms in order to maximize system performance. Existing algorithms for ecient disk scheduling include [1, 11, 22, 8, 12]. The goals of disk scheduling are to minimize

 seek time (system-oriented),  response time (individual I/O request-oriented), and  variance in response time. Scheduling algorithms that have been proposed include First Come First Served (FCFS), Shortest Seek Time First (SSTF), SCAN, and LOOK. However, these algorithms operate on only the requested track number. Emerging applications involving multimedia data impose additional constraints on disk requests, such as nish deadlines or relative priorities. For example, temporal constraints on isochronous multimedia data necessitate deadlines by which the data must be fetched. Careful consideration of these factors is required for consistent and ecient management of disk resources. A class of new disk scheduling algorithms were developed to deal with these additional constraints[18, 25, 19, 7, 3, 14, 6]. A common feature of these new scheduling algorithms is that the additional constraints are satis ed rst. Seek optimization is considered secondary and performed whenever possible. While these scheduling algorithms work well in some cases, disk utilization can be very low as seek optimization is always secondary. In this paper, we present a disk scheduling algorithm with dynamic request priorities where a disk request increases its priority if it has not been served for a long time. While satisfying the priority order of disk requests, we also consider the seek optimization. Our algorithm may serve some low priority requests before high priority requests. Priority inversions may thus occur in some 2

cases. However, the overall system performance is improved. Simulations done to test the performance of our algorithm under di erent load conditions and di erent parameter settings show that the total system response time can be reduced to half its original value. The remainder of the paper is organized as follows: section 2 discusses related work to disk scheduling. Section 3 describes our our scheduling algorithm. Section 4 presents our simulation model. Detailed simulation results are discussed in section 5. Lastly, we summarize our paper in section 6.

2 Related Work The rst group of traditional disk scheduling algorithms[22, 20, 8, 24, 4, 10]. do not use additional information in making disk request scheduling decisions. Seek optimization is done with the use of track information only. The second group of new algorithms make use of additional information such as request deadline or priority.

2.1 Traditional Disk Scheduling Algorithms FCFS This is a policy which has a random seek pattern. It does not take advantage of positional relationships between I/O requests in the current queue or of the current cylinder position of the read/write heads. In general, FCFS is acceptable when disk load is light. FCFS under heavy load gives poor throughput.

SSTF The shortest-seek-time- rst policy improves throughput by servicing the request that results in the shortest seek distance. SSTF has fast mean response, but the algorithm gives rise to large variances in response time.

SCAN With SCAN the disk arm acts as a shuttle as it sweeps back and forth across all the cylinders servicing requests. SCAN was proposed as an alternative to SSTF because it does not discriminate between individual requests. SCAN reduces the variance of response time without sacri cing too much in terms of increasing the mean response time.

3

N-STEP SCAN A variant of SCAN is N-step SCAN which o ers good performance in throughput and mean response time. N-step SCAN behaves like SCAN except that it services only those requests waiting when the particular sweep begins. Requests arriving during sweep are grouped together and ordered for optimum service during the return sweep.

LOOK A variant of SCAN where the disk arm does not reach the inner or outer most track. The arm switches it direction as long as there are no more outstanding requests in that direction. LOOK performs better than SCAN under low load conditions and is nearly equivalent to SCAN when the load is high.

V-SCAN A scheduling strategy that may be tuned to SSTF or SCAN by an adjustable parameter, permitting the dynamic adaptation of the algorithm to changing system conditions[9, 12]. Under heavy load it tends toward SCAN, and under light toward SSTF. From simulation results, V-SCAN is superior to either SCAN or SSTF.

2.2 New Disk Scheduling Algorithms The additional requirements introduced by applications, such as digital multimedia and database systems, make traditional disk scheduling algorithms described above inappropriate. Many new scheduling algorithms have been developed[3, 17, 2, 14, 6, 21].

2.2.1 Multimedia-Speci c Algorithms EDF The Earliest-Deadline-First algorithm is an analog of FCFS. Disk requests are ordered according to deadlines and the request with the earliest deadline is serviced rst. EDF has similar expected seek time as FCFS, since no positional information is used to make scheduling decisions.

SCAN-EDF This strategy is a combination of the SCAN and EDF mechanisms. The request with the earliest deadline is always serviced rst; among requests with the same deadline, the speci c one that is rst according to the scan direction is served rst. Since seek optimization is only applied to requests with the same deadline, its eciency depends on how often it can be applied. 4

2.2.2 Database-Speci c Algorithms Priority-based schemes have been proposed for managing DBMS resources more eciently, These include processor scheduling, disk scheduling, and bu er management [6]. The SCAN algorithm was modi ed to support prioritized requests. Disk requests are grouped on the basis of their priority, and within each group the SCAN algorithm is used. The highest priority group is always serviced rst. The lower priority groups are serviced only when higher priority groups are empty. These new scheduling policies work well in some situations. However, these algorithms treat deadlines/priorities and seek optimization separately. Seek optimization is considered only when the additional requirement is satis ed. The overall system performance may thus su er in in some cases. We give two examples where this is so. request

q1

track distance

deadline

q2 90

10

100

0

q4

q3 10

10

120 130 140

current head position

Figure 1: An example where considering seek time secondary may not provide the best system service.

Example 1 The goal of (soft) real-time disk scheduling is to satisfy the deadline of as many disk requests as possible. Thus EDF and EDF-SCAN always service the disk request with the earliest deadline. Figure 1 illustrates an example of a schedule in which these algorithms are inappropriate. According to EDF or EDF-SCAN, disk request q1 with deadline 100 will be serviced rst. To service q1, the disk head needs to move a long distance. After q1 is served, q2, q3, and q4 can no longer be serviced by their deadline due to the large seek time required for the disk arm to move backwards along its seek path. However, if we service q2, q3, and q4 rst, then only q1 misses its deadline. Considering seek time and deadline together can further improve the system performance.

5

Example 2 Another example for disk scheduling with priorities is when the higher priority queue is always non-empty and short. In such a situation, the lower priority requests do not get serviced as the system is

always busy servicing the high priority requests. Disk utilization can be very low especially if the higher priority requests are spaced far apart. Disk utilization can be increased by promoting the priority level of low priority requests after some interval. In this paper, we present our disk scheduling policy with dynamic request priorities. We will show the bene t of our algorithm and the conditions under which it applies.

3 The Priority Inversion Disk Scheduling Algorithm We model the problem with disk requests of two kinds: high priority and low priority requests. The algorithm is easily generalized to multiple priority levels. We are interested in the waiting time of high priority requests . We are not concerned with the waiting time of low priority requests. A low priority request in the low priority queue is promoted to the high priority queue if it does not get serviced for a certain amount of time. An example of this problem can be found in[16, 15].

Naive Algorithm A naive solution to this problem is to always schedule the high priority requests at the expense of the low priority requests. The low priority requests are serviced only when high priority queue is empty. The total waiting time is thus the sum of the waiting time of all high priority requests. The LOOK scheduling algorithm is used to service requests in each queue. The naive algorithm is shown in Figure 2.

Priority Inversion Algorithm As we described earlier, the problem with the naive algorithm is that when the high priority queue is always non-empty and short, the disk utilization is low. One way to improve the disk performance in this case is to serve some low priority requests when high priority queue is always short. The disadvantage of this policy is that priority inversions may occur when low priority requests are serviced while high priority requests are 6

Loop { If (High Priority Queue != Empty) Schedule High Priority Queue Else Schedule Low Priority Queue }

Figure 2: The naive disk scheduling algorithm. waiting in the queue. However, higher disk utilization is possible. Loop { If (High Priority Queue != Empty) Schedule High Priority Queue Else Schedule Low Priority Queue If (The Length of High Priority Queue

Suggest Documents