VIEWS: 5 PAGES: 10 POSTED ON: 12/23/2009
Competitive Analysis of On-Line Disk Scheduling? Tzuoo-Hawn Yeh, Cheng-Ming Kuo, Chin-Laung Lei, and Hsu-Chun Yen Department of Electrical Engineering National Taiwan University, Taipei, Taiwan, ROC Abstract. We give a detailed competitive analysis of a popular on-line disk scheduling algorithm, namely, LOOK . Our analysis yields a tight competitive ratio for the LOOK algorithm. By comparing and contrast- ing the competitive ratio of LOOK with the lower bounds of FCFS and SSTF (which are equally popular in disk scheduling), our results provide strong evidence to suggest that when the workload of disk ac- cess is heavy, LOOK outperforms SSTF and FCFS . As a by-product, our analysis also reveals (quantitatively) the role played by the degree of look-ahead in disk scheduling. 1 Introduction Disk scheduling is a problem that is of practical importance and theoretical interest in the study of computer systems (in particular, in the areas of databases and operating systems) 9]. The goal of disk scheduling is to devise a policy for servicing disk requests in an on-line fashion so as to minimize the total disk access time. Previous works on the study of the disk scheduling problem resort to proba- bilistic analysis 3,7,11,12], simulation 6{8,11,12], or amortized analysis 1]. As an alternative to the aforementioned analytical techniques, in this paper we study various disk scheduling algorithms through the use of the so-called competitive analysis technique. Competitive analysis has its origin in a paper by Sleator and Tarjan 10]. In this approach, the e ciency of an on-line algorithm is compared with that of an optimal o -line algorithm. An on-line algorithm is competitive if its cost is within a constant factor of that of the optimal o -line algorithm for all request sequences. To be more precise, an on-line algorithm A is said to be -competitive if there exists a constant such that for any request sequence , CA ( ) COPT ( )+ ; where OPT is an optimal o -line algorithm, and CA ( ) (respectively, COPT ( )) is the cost of algorithm A (respectively, OPT ) over re- quest sequence . The constant is called the competitive ratio of algorithm A. For more about competitive analysis, see, e.g., 2,4,5] Given a sequence of requests on a disk equipped with a single read-write head and a waiting queue of a xed size, the goal of disk scheduling is to design a strategy for picking requests (in an on-line fashion) from the waiting queue to service so that the total cost of service is minimized. The waiting queue is capable of holding a xed amount of requests from which the next request to ? This work was supported in part by the National Science Council of the Republic of China under Grant NSC-84-2213-E-002-002. service is chosen. Once a request enters the waiting queue, it is entitled to be serviced next even though the waiting queue might contain requests that arrived earlier. (That is, requests in the waiting queue are serviced in a random order.) Conversely, a request can be serviced only if it resides in the waiting queue. In our model, disk scheduling algorithms are di erentiated mainly by the order in which the next request to service is chosen, as well as by the way future requests enter the waiting queue. (To a certain degree, the waiting queue o ers some sort of a look-ahead capability.) In this paper, we give a detailed competitive analysis for a popular schedul- ing algorithm, namely, the LOOK algorithm 9]. As it turns out, LOOK is WT +D WT +D=(2W ?1) -competitive, where W is the size of the waiting queue, D is the number of cylinders on the disk less one, and T is a constant capturing the seek startup time, the latency time, and the data transfer time needed to complete a disk access. We also show the above bound to be tight. By viewing the size of the waiting queue as the degree of look-ahead, our derived bound precisely reveals how look-ahead a ects the competitive ratio of LOOK . Interestingly, previous study on the k ? server problem suggests that look-ahead plays a neg- ligible role as far as the algorithm's competitive ratio is concerned. Aside from the detailed competitive analysis for LOOK , we also compare the lower bound of LOOK with that of other popular scheduling policies such as rst-come- rst- served (FCFS ) and shortest-seek-time- rst (SSTF ). In practice, the size of the waiting queue can also be interpreted as the average workload of the disk. By comparing and contrasting the competitive ratio of LOOK with that (lower bounds) of FCFS and SSTF , our analysis provides strong evidence to suggest that when the workload of disk access is heavy, LOOK seems to outperform SSTF and FCFS . (The interested reader is referred to 9] for a comparative analysis of the above scheduling policies from a probabilistic viewpoint.) The remainder of this paper is organized as follows. Section 2 gives the def- initions of the disk model, the cost measure, and a number of disk scheduling algorithms found in the literature. Section 3 concerns itself with deriving the lower bounds of the competitive ratios of the FCFS , SSTF , and LOOK algo- rithms. In Sections 4 and 5, we derive the upper bound of the competitive ratio of the LOOK algorithm in detail. Discussion and concluding remarks are given in Section 6. 2 Preliminaries The disk scheduling problem considered in this paper is that of, given an on- line sequence of disk requests and a waiting queue of a xed size, designing a strategy for picking requests from the waiting queue to service so that the total cost (including the seek time, the latency time, and the transfer time) is minimized. For ease of explanation, a disk with D + 1 cylinders can be viewed as a line segment along which cylinder 0 (respectively, D) is the leftmost (respectively, rightmost) cylinder. A request on cylinder x is denoted as x. A request sequence is a sequence of requests waiting to be serviced. The waiting queue, which will be referred to as the window throughout the rest of the paper, is capable of holding a xed number of requests from which the next request to be serviced is chosen. Once a request resides in the window, the request is entitled to be serviced next even though the window might contain earlier requests. Conversely, a request must be in the window before it can be serviced. The order in which the next request to service is selected from the window and the way future requests are brought into the window upon the completion of servicing a request depend on the underlying on-line algorithm, and will be elaborated later in conjunction with the de nition of the algorithm. Given a seek distance y (measured in terms of the number of cylinders trav- eled by the disk head), the seek time is a function of the form f (y) = s + ky, where s is the seek startup time and k is the seek time per cylinder 6,11,12]. The latency time, as suggested in the literature, is di cult to be modeled precisely; hence, the so-called \average latency time," a constant which is usually given in the disk speci cation, is employed to approximate the latency time. The transfer time is usually a constant if the size of the data to be transferred is xed. In this paper, the cost of servicing a request is de ned to be a constant (capturing the seek startup time, the average latency time and the transfer time) plus the distance the disk head travels. The notations used throughout this paper are listed below: D: cylinders are numbered from 0 to D. W : a constant representing the size of the window. T : a constant which captures the sum of the seek startup time, the latency time, and the transfer time of a request. = hx1 xn i: a request sequence. hi denotes an empty request sequence. hA : (0 hA D) the cylinder at which the disk head of algorithm A locates. CA ( ): the cost of algorithm A for servicing request sequence . l( ) (respectively, r( )): the leftmost (respectively, rightmost) request in , where is either a request sequence or a multiset of requests. j j: the length of request sequence , i.e., the number of requests in . Given a request sequence and an algorithm, the schedule, denoted as hhx1 ; x2 ; : : : ; xn ii, is the servicing sequence, that is, xi 2 is the i-th serviced request. The path, which is a sequence of cylinders, records the cylinders the algorithm travels during its move. The cost of the algorithm is d + m T , where d is the total distance traveled and m is the number of serviced requests. In this paper, we consider the following disk scheduling algorithms: FCFS : This algorithm always selects the rst request in the remaining request sequence to service. LOOK : Using this policy, requests are grouped into blocks, each of which (ex- cept perhaps the last one) is of size W . All the requests in the window have to be serviced completely before the next W requests are brought into the window. Let be the current block of requests, and h be the current position of the disk head. If h l( ) r( ), then the disk head sweeps to cylinder r( ), servicing all the requests in the window. The case where l( ) r( ) h is symmetric. If l( ) < h < r( ) and h is closer to l( ) than to r( ), then the disk head rst moves to cylinder l( ) and then sweeps (to the right) across the disk until reaching r( ), servicing all the requests in between. The case when r( ) is closer is symmetric. For simplicity, we assume that the disk head moves to l( ) then sweeps to r( ) when r( ) ? h = h ? l( ). SSTF : This algorithm always chooses the request in the window that is closest to the disk head to service. (For simplicity, break tie by servicing the request to the left rst.) We assume that the window for SSTF is full at all times unless no further requests can be brought into the window. ADV can be thought of as a generic scheduling algorithm against which the on-line scheduling algorithms (such as FCFS , LOOK , and SSTF ) will be compared. Since the role played by ADV is to maximize the ratio of the costs incurred by the on-line algorithms and ADV , it is natural to give as much freedom (or power) to ADV as possible. Having this in mind, in our subsequent discussion we assume that the window for ADV is full at all times unless no further requests can be brought into the window. 3 Lower Bounds In this section, the lower bounds of the competitive ratios for algorithms FCFS , SSTF , and LOOK are derived. Initially, the disk head is assumed to be at cylinder 0. For ease of expression, we let k represent repeated k times, where is a request or a sequence of requests. Theorem 1. FCFS T +D T +D=(2W ?1) : Proof. Consider the request sequence = (D0)(2W ?1)n , where n is a non- negative integer. FCFS services using the schedule (D0)(2W ?1)n , and CFCFS = 2n(2W ? 1)(T + D). One can service using the schedule 0W ?1 (D2W ?1 02W ?1 )n?1 D2W ?1 0W , so CADV 2n(2W ? 1)T +2nD. Therefore, we (2W ?1)( )? have FCFS CFCFS ( ( )? 2nn(2W ?1)T +DnD , which approaches T +D=+D ?1) CADV ) 2 T +2 T (2W when n is large. u t Theorem 2. LOOK WT +D WT +D=(2W ?1) : Proof. Consider the following request sequence = ((0W ?1 D0W )W ?1 DW (DW ?1 0DW )W ?1 0W )n , where n is a non-negative integer. LOOK services using the schedule hh ii, and CLOOK = 2nW (2W ? 1)T +2n(2W ? 1)D. One can service using the schedule (0(W ?1)(2W ?1) D2W ?1 D(W ?1)(2W ?1) 02W ?1 )n ; so CADV 2nW (2W ? 1)T +2nD. Therefore, we have LOOK CLOOK (( )) ? CADV 2n(2W ?1)(WT +D )? 2n(W (2W ?1)T +D ) WT , which approaches WT +D=+D ?1) when n is large. (2W t u Theorem 3. T +b D c : SSTF 2 T +b D c(2W ?1) 2 Proof. Consider the request sequence: = DW ?1 (b D c0)n(2W ?1)+W , where n 2 is a non-negative integer. SSTF services using the schedule (b D c0)n(2W ?1)+W 2 DW ?1 , and CSSTF = (2n(2W ? 1) + 3W ? 1)T + 2(n(2W ? 1) + W )b D c + D. 2 One can service using the schedule DW ?1 b D cW (02W ?1 b D c2W ?1 )n 0W , so 2 2 CADV (2n(2W ? 1) + 3W ? 1)T + 2D + 2nb D c. When n is large, we have 2 T +b D c u t SSTF T +b D c=(2W ?1) : 2 2 4 The Behavior of ADV Against LOOK In this section, we characterize a class of adversaries, called aggressive adver- saries, that are capable of enforcing the maximum competitive ratios against on-line algorithms. An adversary ADV is aggressive if it always services the request in the window that is adjacent to the disk head. (A request x is adja- cent to hADV if x = hADV or there is no request x0 in the window such that hADV x0 < x or x < x0 hADV .) In what follows, we argue that for any adversary ADV and request sequence , there exists an aggressive adversary ADV 0 such that CADV 0 ( ) CADV ( ). To prove this, we rst construct an ADV 00 (for ADV ) which follows exactly the same path as that of ADV , and, whenever the traversal of ADV 00 from one location to another encounters a request already resides in the window, such a request will be serviced immediately, even though the request is serviced later on the original path of ADV . It is obvious that CADV 00 ( ) = CADV ( ). Due to the behavior of ADV 00 (which follows the same path of ADV ), it is likely that ADV 00 might travel to locations at which the associated requests have been serviced already. (Recall that ADV 00 follows ADV while servicing requests at a possibly faster pace.) ADV 0 is constructed from ADV 00 by removing all disk head movements that are unnecessary as far as servicing requests is concerned. Trivially, the cost of ADV 0 is no more than that of ADV 00 . It is easy to see that ADV 0 is aggressive. Based on the above discussion, we have: Theorem 4. For every adversary ADV and request sequence , there is an aggressive adversary ADV 0 such that CADV 0 ( ) CADV ( ): The notion of a phase is critical in our subsequent discussion about LOOK . The original request sequence is partitioned into blocks of size W each (except perhaps the last block) and each block is called a phase of requests. Formally, is partitioned as = 1 2 n , where j k j = W (8k, 1 k n ? 1) and j n j W . k is called the k-th phase of requests. The period for LOOK to service the requests in k is called the k-th phase of LOOK . The de nition of a phase for ADV (assuming that ADV is aggressive) is more complicated, for ADV is capable of holding a request in the window while continuously servicing an arbitrary number of future requests. Consider a request sequence = hx1 ; x2 ; : : : ; xn i. In the rst phase, ADV services exactly one requests. From the second phase on, ADV services W requests in each phase, except perhaps the last phase. In the last phase, ADV services the remaining requests. The number of requests serviced in the last phase is less than or equal to W . Consider an ADV and a request sequence = 1 n , where k , 1 k n, is the k-th phase of requests. Let hk be the disk head position of an algorithm A A at the end of phase k. k is called canonical with respect to ADV if the following two conditions are satis ed: Canonical Condition 1: For any replacement 0 of k , if j 0 j = j k j and the pathsP LOOK on 1 P n and 1 0 n are identical, then we of k k?1 have x2 k jx ? hADV j k?1 x2 0 jx ? hADV j. Case Disk con guration k 0 Case Disk con guration 0 k 1 L A r, L l A j k j?1 r 1 0 r L, l A L A j k j?1 l 2 A<L l r Lj k j?1 r 20 l r L < A Lj k j?1 l 3 L l r<A r j kj 3 0 A<l r L lj k j 4 A l<L<r l j k j?1 r 4 0 l<L<r A r j k j?1 l If the rst request on l appears before the rst request on 5 l < A < r, l < L < r r in k , then 0 = Aj k j?2 lr, otherwise, 0 = Aj k j?2 rl. k k Table 1. The construction of k from k?1, ADV k?1 , and LOOK . (A = hk?1 k?1 , ADV L = hk?1 , l = l( k ), and r = r( k ).) LOOK procedure canonical( ; ADV ); 0 = ; ADV 0 = ADV ; for k = 1 to n do begin 0 Construct k using the rules provided in Table 1; 0 (It is easy to see that the paths of LOOK on k and k are identical.) Let k = 1 k 0 0 ?1 k k+1 0 n; Let ADV 00 k (on k ) follow the same path of ADV k?1 (on k?1 ); Convert ADV 00 k into an aggressive ADV k (on k )|guaranteed by Theorem 4. end 0 = n ; ADV 0 = ADV n ; Fig. 1. The procedure for constructing a canonical request sequence. Canonical Condition 2: For any x; y 2 k , if y < x hk?1 or hk?1ADV ADV x< y, then x proceeds y in k . A request sequence is called canonical with respect to ADV if all its phases are canonical with respect to ADV . Theorem 5. Given a request sequence and adversary ADV , there exist a request sequence 0 and an aggressive adversary ADV 0 such that 0 is canonical with respect to ADV 0 , CADV 0 ( 0 ) CADV ( ), and CLOOK ( 0 ) = CLOOK ( ). Proof. Without loss of generality we assume that ADV is aggressive. Let = 1 n , where k , 1 k n, is the k-th phase of requests. 0 and ADV 0 are constructed using the procedure in Figure 1. In what follows, we show the following: (C1) ADV 00 k is capable of servicing k ; (C2) ADV k is aggressive; (C3) 0 k is canonical with respect to ADV k ; and (C4) CADV k ( k ) CADV k?1 ( k?1 ), for all k, 1 k n. (C2) follows from the construction of ADV k . (See the procedure in Figure 1.) By the procedure in Figure 1, the paths of ADV k?1 , ADV 00 k , and ADV k are identical in the rst k ? 1 phases. Thus, at the beginning of phase k, the head k?1 k?1 k?1 positions of them are of the same, i.e., hADV k?1 = hADV 00 k = hADV k , and their windows contain the same requests at the beginning of phase k, except the new request that comes from the rst request in the k-th phase of requests. In what k?1 follows, we rst prove (C1) and (C3). (For ease of expression, let A = hADV k?1 , L = hLOOKk?1 , l = l( k ), and r = r( k ) as in Table 1 in the following case analysis.) 0 Case 1: In this case, L A r and L l, and we let k = Aj k j? r. Suppose 1 0 is an arbitrary sequence such that j 0 j = j 0 j and LOOK follows the same k 0 path on 0 and k . Then 0Prequests must lie in the interval L; r] and request 's P r must be in 0 . Clearly, x2 k jx ? Aj(= jr ? Aj) 0 x2 0 jx ? Aj: Hence, 0 Canonical Condition 1 is met for k with respect to ADV k . (Notice that k?1 = hk?1 hADV k ADV k?1 .) Canonical Condition 2 clearly holds. Thus, (C3) holds. 0 It remains to show that ADV 00 k is capable of processing k while following the same path of ADV k?1 on k . At the beginning of this phase, ADV 00 k can service Aj k j?1 . And ADV 00 k can service r when ADV k?1 services r. The remaining sequence h k+1 n i can be serviced by ADV 00 k at the same time when ADV k?1 services them. So (C1) holds. The proof technique of Cases 2|5 is similar to Case 1. The details can be found in 13]. In the following, we prove (C4). Since ADV 00 k and ADV k?1 follow that same path, we have CADV 00 k ( k ) = CADV k?1 ( k?1 ). By Theorem 4, CADV k ( k ) CADV 00 k ( k ). Thus, CADV k ( k ) CADV k?1 ( k?1 ), for any k, 1 k n. By the procedure in Figure 1, we have constructed an aggressive adversary ADV 0 and a request sequence 0 that is canonical with respect to ADV 0 . And the cost of ADV 0 on 0 is no more than the cost of ADV on . (By (C4), CADV 0 ( 0 ) = CADV n ( n ) CADV n?1 ( n ) CADV 0 ( 0 ) = CADV ( ).) Since LOOK follows an identical path on and 0 is not changed, the equality CLOOK ( 0 ) = CLOOK ( ) holds trivially. t u 5 Competitive Analysis of LOOK In this section we will show that LOOK is competitive and the derived com- petitive ratio matches its lower bound. Our analysis is based on the poten- tial technique. Let be an arbitrary request sequence, n = dj j=W e and k , 1 k n, be a potential function that maps the con gurations of LOOK and ADV at the end of phase k to a real number. Also, let k = k ? k?1 be k k the change of potential during phase k, and CADV and CLOOK be the costs of phase k for ADV and LOOK , respectively. For a constant , if we can show k that CLOOK + k k CADV for any k, 1 < k < n, then, Pn k CLOOK ( ) = k=1 CLOOK Pn?1 ? k ? 1 n = k=2 CLOOK + k ? k?1 + CLOOK + CLOOK + 1 ? n?1 Pn?1 k ? 1 n k=2 CADV ?+ CLOOK + CLOOK + 1 ? n?1 n CADV ( ) + CLOOK + CLOOK + 1 ? n?1 ; 1 | {z } additive constant That is to say, if (1) we can bound the cost of LOOK plus the change of the potential in every phase (except the rst and the last phase) within a factor of n to the cost of ADV in the same phase, and (2) CLOOK + CLOOK + 1 ? n?1 1 is bounded by some constant , then LOOK is -competitive. The rst and last phases are excluded from the discussion because ADV services only one request in the rst phase, whereas LOOK may service less than W requests in the last phase. These situations are awkward to analyze in a systematic way and are thus grouped into the additive constant . Let = 1 2 n be the request sequence under consideration, where k , 1 k n, is the k-th phase of requests. De ne the delayed set of ADV at the end of phase k, Bk , to be the requests in 1 2 k that have not yet been serviced by ADV at the end of phase k. Clearly, Bk is exactly ADV 's window content at the end of phase k minus the rst request in k+1 that is just brought into the window. Let hk and hk ADV LOOK be the head positions of ADV and LOOK , respectively, at the end of phase k. The potential at the end of phase k is de ned as k = M ( 1 + 2 + 3 + 4 ), where M = (2W WT + D + D ; ? 1)WT 1 = hk ? h k ADV LOOK ; P k 2 = ?2 q2Bk hADV ? q ; 8 < 2 hk k k k ADV ? hLOOK ; ifk hADV <k hLOOK < q or q < 3 = hLOOK < hADV , for all q 2 Bk , : 0; otherwise, 4 = K ( 1 ? 1); where K = min(hk M LOOK ; D ? hk ). LOOK Notice that 0 M 1; and ?2M (W ? 1)D k 3MD + b D c(1 ? M ); and k WT CLOOK d3D=2e + WT , for any k, that is, the potential function is 2 bounded from below and above. Throughout the remainder of this section, we will focus on one phase of operations of ADV and LOOK , and we call this phase the \current" phase. Let be the current phase of request, l = l( ) and r = r( ). Let CADV and CLOOK be the costs of ADV and LOOK , respectively, in the current phase. Let B , A, L, , and i , for 1 i 4, be the delayed set, head position of ADV and LOOK , and the potential and its four components at the beginning of the current phase, respectively; and B 0 , A0 , L0 , 0 , and 0i , for 1 i 4 be the corresponding items at the end of the current phase. Let = 0 ? and i = 0i ? i , for 1 i 4. By Theorems 4 and 5, we can restrict our analysis to aggressive adversaries and canonical phases of requests. The main result of this section is stated in the following theorem: Theorem 6. The LOOK algorithm is M (2W ? 1)-competitive. First, we consider the case where T = 0. Notice that in this case, M = 1, and 4 is always 0 and can be omitted in the discussion of the following lemma. Lemma 7. LOOK is (2W ? 1)-competitive when T = 0. In particular, we have CLOOK + (2W ? 1)CADV : Proof. The proof of the lemma is proceeded according to the classi cation of Table 1. The proof is rather complicated; hence, the details are omitted due to space limitation. The reader is referred to 13] for details. u t Next, we will show how to generalize the result to the case where T = t > 0. T =t T =t For ease of expression, let CADV , CLOOK , and T =t be CADV , CLOOK , and , respectively, when T = t. Lemma 8. If CLOOK + T =0 (2W ? 1) CADV when T = 0, then CLOOK + T =0 T =0 T =t T =t m(2W ? 1) C T =t when T = t > 0, where m is the value of M when ADV T = t. Proof. Let K be the di erence of K in 4 after and before LOOK services a T =0 phase of requests . We show that K + CLOOK D for any phase of requests . In the following, we consider cases where L L0 . Those cases where L0 L are omitted. Let u = b D c denote the middle cylinder of the disk. Consider the case L L0 u: The disk head of the LOOK algorithm can rst move left 2 x cylinders and then it must sweep to cylinder L0 . Notice that x + L0 ? L b D c. In this case, we have: K = L0 ? L and CLOOK = 2x + L0 ? L. Then, T =0 2 T =0 = 2 (x + L0 ? L) D. The other cases (i.e., L u < L0 and K + CLOOK u < L < L0 ) are similar. See 13] for details. In all the cases above, we get T =0 K + CLOOK D. As a result, CLOOK + T =t = CLOOK + Wt + m T =0 + K ( m ? 1) T =t T =0 1 T =0 = m CLOOK + T =0 + m(2W ? 1)Wt T =0 + (1 ? m) CLOOK + K (1 ? m) + Wt(1 ? m(2W ? 1)) T =0 m(2W ? 1) CADV + m(2W ? 1)Wt T =0 + (1 ? m) CLOOK + K (1 ? m) + Wt(1 ? m(2W ? 1)) T =t 2( ? 1)Wt = m(2W ? 1) CADV (2W W 1)Wt + D T =0 K + CLOOK ? D ? T =t m(2W ? 1) CADV ; for any phase and any t > 0. t u By Lemmas 7 and 8, we conclude that LOOK is M (2W ? 1)-competitive. 6 Discussions and Conclusions In this section, we discuss the impact of the window size on the competitive ratio of a disk scheduling algorithm with respect to a given disk drive. The results will make it possible for a system programmer to implement a much more e cient disk scheduling algorithm by selecting a suitable window size according to the characteristics of the given disk drive in use. Di erent disk drives may have di erent number of cylinders and value of T . The D=T ratios of the disk drives discussed in 6,8,11,12] range from 1 to 4. We plot the competitive ratio versus the window size for di erent D=T ratios in Figure 2. We can see from the gures that di erent D=T ratios (di erent disk drives) result in di erent competitive ratios. But, for W > 2, the competitive ratio of LOOK is always lower than the lower bounds of FCFS and SSTF regardless of the D=T ratio. Summarizing the results in this paper, we have given a detailed competi- tive analysis of the LOOK algorithm under a cost function that takes the seek 2 4.5 1.9 4 L.B. of FCFS 1.8 L.B. of FCFS 1.7 3.5 Competitive ratio Competitive ratio 1.6 3 1.5 L.B. of SSTF 2.5 1.4 L.B. of SSTF 1.3 2 1.2 U.B of LOOK U.B of LOOK 1.5 1.1 1 1 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 W W (a) D=T = 1 (b) D=T = 4 Fig. 2. Comparison of FCFS, SSTF , and LOOK . startup, latency, and transfer times into consideration. We have proven that the S WT competitive ratio of LOOK is WT +D=+D ?1) , where D is the number of cylin- o (2W ders less one, W is the window size, T is a constant capturing the seek startup F time, the latency time and the transfer time. The competitive ratio of LOOK matches its lower bound. We have also shown that LOOK is better than SSTF and FCFS in the competitive sense when the window size W > 2. Our results match previous results that LOOK performs better than SSTF and FCFS when the work load of the disk is heavy 9]. References 1. T. Chen, W. Yang, and R. Lee. Amortized analysis of some disk scheduling algorithms: SSTF, SCAN, and n-step SCAN. BIT, 32:546{558, 1992. 2. M. Chrobak and L. Larmore. An optimal on-line algorithm for k-servers on trees. SIAM Journal on Computing, 20:144{148, 1991. 3. E. Co man, Jr. and M. Hofri. On the expected performance of scanning disks. SIAM Journal on Computing, 11(1):60{70, February 1982. 4. A. Fiat, D. Foster, H. Karlo , Y. Rabani, Y. Ravid, and N. E. Young. Competitive paging algorithms. Journal of Algorithms, 12:685{699, 1991. 5. A. Fiat, Y. Rabani, and Y. Ravid. Competitive k-server algorithms. J. Computer and System Sciences, 48:410{428, 1994. 6. R. Geist and S. Daniel. A continuum of disk scheduling algorithms. ACM Transactions on Computer Systems, 5(1):77{92, February 1987. 7. M. Hofri. Disk scheduling: FCFS vs. SSTF revisited. Comm. of the ACM, 23(11):645{653, November 1980. 8. M. Seltze, P. Chen, and J. Ousterhout. Disk scheduling revisited. In USENIX Technique Conference, 1990. 9. A. Silberschatz, J. Peterson, and P. Galvin. Operating System Concepts. Addison Wesley, third edition, 1991. 10. D. Sleator and R. Tarjan. Amortized e ciency of list update and paging rules. Comm. of the ACM, 28(2):202{208, February 1985. 11. T. Teorey and T. Pinkerton. A comparative analysis of disk scheduling policies. Comm. of the ACM, 15(3):177{184, March 1972. 12. N. Wilhelm. An anomaly in disk scheduling: a comparison of FCFS and SSTF seek scheduling using an empirical model for disk accesses. Comm. of the ACM, 19(1):13{17, January 1976. 13. T. Yeh, C. Kuo, C. Lei, and H. Yen. Competitive analysis of on-line disk scheduling. Technical report, Dept. of Electircal Engineering, National Taiwan University, 1995.