• 沒有找到結果。

Reschedulable-Group-SCAN scheme for mixed real-time/non-real-time disk scheduling in a multimedia system

N/A
N/A
Protected

Academic year: 2021

Share "Reschedulable-Group-SCAN scheme for mixed real-time/non-real-time disk scheduling in a multimedia system"

Copied!
10
0
0

加載中.... (立即查看全文)

全文

(1)

Reschedulable-Group-SCAN scheme for mixed

real-time/non-real-time disk scheduling in a multimedia system

Hsung-Pin Chang

a

,Ray-I Chang

b

,Wei-Kuan Shih

c

,Ruei-Chuan Chang

a,*

aDepartment of Computer and Information Science, National Chiao Tung University, 1001 Ta Hsueh Road, Hsinchu 30050, Taiwan, ROC bInstitute of Information Science, Academia Sinica, Taipei, Taiwan, ROC

cDepartment of Computer Science, National Tsing Hau University, Hsinchu, Taiwan, ROC

Received 21 June 2000; received in revised form 7 October 2000; accepted 2 January 2001

Abstract

Real-time disk scheduling is important for time-critical multimedia applications. Previous approaches,such as SCAN-earliest deadline ®rst (EDF) or DM-SCAN,applied the SCAN scheme to reschedule service sequence of input tasks to reduce tasks' service time. However,they required the input to be in EDF order. In DM-SCAN,a deadline modi®cation scheme was employed to obtain a pseudo-EDF sequence from non-EDF ordered input tasks. Because the modi®ed deadlines were smaller than the original ones, number of tasks that could be rescheduled is decreased and thus data throughput is reduced. In this paper,we propose Resched-ulable-Group-SCAN (RG-SCAN),a new real-time disk scheduling algorithm using the concept of Reschedulable-Group (R-Group). Di€ering from previous approaches,RG-SCAN has no limitation on the input task's sequence. In addition,by exploiting the service time's reduction after rescheduling in each R-Group,RG-SCAN has been extended to serve mixed real-time and non-real-time workloads. As shown in experimental results,our approach can support more tasks than DM-SCAN,both non-real-time and non-real-time. Additionally,our approach can provide larger data throughput and o€er better response time to non-real-time tasks. For example,given 30 random-generated real-time tasks,the number of non-real-time tasks that can be supported by RG-SCAN is 1.3 times that supported by DM-SCAN. In addition,our data throughput is 1.1 times DM-SCAN's. Ó 2001 Elsevier Science Inc. All rights reserved.

Keywords: Real-time disk scheduling; Mixed workload; Multimedia database/®le systems; Operating system

1. Introduction

In the last decade,advances in hardware technology have dramatically increased processor speeds,and this increase is expected to continue to double every year. However,although disk capacity is improved at 60±80% compounded annually,no similar advances are expected to reduce the access time of storage devices. As a result, the performance gap between processors and disks continues to increase and a computer system's perfor-mance is increasingly limited by the storage subsystem. This problem is becoming more serious with the emer-gence of multimedia applications (Lougher and Shep-herd,1993; Gemmell et al.,1995). Multimedia data usually consume signi®cant disk bandwidth and many viewers have to be supported simultaneously (Dan et al.,

1994). In addition,due to the rigorous timing require-ments for jitter-free playback,media data must be ac-cessed under real-time constraints (Gemmell and Christodoulakis,1992). Therefore,how to maximize data throughput under real-time constraints poses a challenge in the design of a real-time multimedia disk scheduling algorithm (Steinmetz,1995).

The SCAN algorithm was ®rst proposed by Denning for scheduling conventional disk tasks (Denning,1967). By moving the disk arm from the innermost track to the outermost track or vice versa to retrieve data block when it passes through,the SCAN algorithm minimizes the seek-time cost and has been proved as an optimal algorithm under amortized analysis and probability model (Chen and Yang,1992; Chen et al.,1992). However,due to the lack of timing consideration,the SCAN algorithm is not suitable for scheduling real-time disk tasks. To address a task's real-time characteristic, earliest deadline ®rst (EDF) was proposed and shown to be optimal if tasks are independent (Liu and Layland,

www.elsevier.com/locate/jss

*Corresponding author. Tel.: 5712121-56656; fax:

+886-3-5721490.

E-mail address: rc@cc.nctu.edu.tw (R.-C. Chang).

0164-1212/01/$ - see front matter Ó 2001 Elsevier Science Inc. All rights reserved. PII: S 0 1 6 4 - 1 2 1 2 ( 0 1 ) 0 0 0 5 8 - 9

(2)

1973; Lehoczky,1990; Lin and Tarng,1991). Never-theless,for disk scheduling,the service time of a disk task depends on the previous task's track location,and the assumption that tasks are independent is not held. Actually,taking only deadlines into account without service time consideration,EDF incurs excessive seek-time costs and results in poor disk throughput (Reddy and Wyllie,1994).

Therefore,researchers are investigating methods to combine the features of SCAN type of seek-optimizing algorithms with EDF type of retime scheduling al-gorithms (Chang et al.,2000). For example,given an EDF schedule,SCAN-EDF reschedules tasks with the same deadline by SCAN to improve the data through-put (Reddy and Wyllie,1993). Thus,the eciency of SCAN-EDF depends upon how many tasks have the same deadlines,i.e.,how often the SCAN algorithm can be applied. To increase the rescheduling probability,the DM-SCAN scheme was proposed (Chang et al.,1998). However,in both SCAN-EDF and DM-SCAN,the input tasks must be in EDF order before the seek-op-timizing SCAN scheme is applied. Because the input tasks may not conform to an EDF order,a deadline modi®cation scheme is proposed by DM-SCAN,trans-ferring non-EDF ordered tasks into a pseudo-EDF se-quence. (Here,``pseudo'' means the tasks are ordered by the modi®ed deadlines,not their actual deadlines.) In this way,the input tasks would always keep as an EDF sequence. In addition,making the rescheduled result to be EDF-ordered by a deadline modi®cation scheme, DM-SCAN applies the rescheduling idea iteratively to progressively improve disk performance. Unfortunately, in order to guarantee real-time constraints,the modi®ed deadlines are earlier than the original ones. As a result, the number of input tasks that can be rescheduled to reduce service time is decreased and the obtained data throughput is lowered.

To resolve the drawback of DM-SCAN,in this pa-per,we propose Reschedulable-Group-SCAN (RG-SCAN) scheme: a new real-time disk scheduling algorithm that uses the concept of Reschedulable-Group (Group). Given a set of real-time disk tasks,an R-Group consists of the maximum number of continuous disk tasks that can be rescheduled without violating their respective timing constraints. Therefore,by seek-optimizing tasks in R-Groups,data throughput is im-proved under real-time guarantees. In addition,our proposed RG-SCAN assumes no speci®c input sequence and thus does not require deadline modi®cation in each iteration. Consequently,our approach is more ¯exible and obtains more data throughput than DM-SCAN algorithms. Furthermore,we extend the proposed ap-proach to serve mixed real-time/non-real-time tasks in a multimedia environment. By exploiting the reduction of service time after rescheduling tasks within each R-Group,non-real-time tasks can be served to minimize

response time while guaranteeing the timing constraints of real-time tasks. As presented in experimental results, our approach can support more tasks than DM-SCAN, both real-time and non-real-time. Additionally,our approach can provide larger data throughput and o€er better response time to non-real-time tasks. For exam-ple,given 30 randomly generated real-time tasks,the number of non-real-time tasks which can be supported by RG-SCAN is 1.3 times that supported by SCAN; and our data throughput is 1.1 times DM-SCAN's.

The remainder of this paper is organized as follows. Section 2 presents the disk service model in a real-time multimedia environment and de®nes the real-time disk scheduling problems. The previous DM-SCAN ap-proach is introduced in Section 3. In Section 4,we present the de®nition of R-Group and our proposed RG-SCAN real-time disk scheduling algorithm. Section 5 demonstrates how RG-SCAN is extended to eciently serve mixed real-time/non-real-time disk tasks. Sections 6 and 7 present the experimental results and the con-clusion remarks,respectively.

2. Problem descriptions

2.1. Disk service model in a real-time multimedia environment

Assume that start-time and ®nish-time denote the actual times at which a task is started and completed, respectively. To describe the timing characteristics of a real-time task,two parameters are associated with it to determine the proper start-time and ®nish-time:

· Ready time: the earliest time at which a task can start. · Deadline: the latest time at which a task must be

com-pleted.

If a task is started before its ready time,some of the resources,e.g.,bu€er pool,network controller,will over¯ow and the system will be erratic. In addition,if a task is not completed before its deadline,users will perceive glitches during the playing,which would violate the spirit of multimedia applications. Thus,to meet the real-time requirements,the start-time of a task should not be earlier than its ready time. Additionally,its ®nish-time should not be later than the related deadline (Je€ay et al.,1991; Stankovic and Buttazzo,1995). A schedule of real-time tasks is said to be feasible if all tasks can be sequentially served according to the speci®ed real-time requirements.

To serve a disk task,the disk-head ®rst needs to be moved from the previous task's cylinder to the requested one by a seek-time cost. Then a rotational latency is presented for the desired sector rotated under the disk read±write head. Finally,the asked data are transferred from disk to bu€er by a transfer time. Therefore,a

(3)

conventional disk task Tiis denoted by three parameters

…ti; li; bi†,where ti is the track location, li is the sector

number,and biis the data size. Assume that the schedule

sequence is TjTi. The service time of task Tiis calculated

as

cj;iˆ seek time…abs…ti tj†† ‡ rotational latency…li†

‡ transfer time…bi†: …1†

Clearly,the service time not only depends on the re-quested task itself but relates to the previous one. For example,in a HP 97560 hard disk (Ruemmler and

Wyllie,1994),the service time cj;i with movement

dis-tance dj;iˆ jti tjj can be modeled by

cj;iˆ 3:24 ‡ 0:4  dj;i p ; dj;i6 383; 8:00 ‡ 0:008dj;i; dj;i> 383;  …2† which is piecewise non-linear,a non-decreasing concave function.

As stated above,disk tasks used to serve time-critical multimedia applications must be real-time guaranteed.

Accordingly,for each disk task Ti in a multimedia

en-vironment,two more parameters are presented to characterize its real-time attributes: …ri; di†,where ri is

the ready time and di is its deadline. As disk tasks are

non-preemptive,the start-time si and ®nish-time fi of a

real-time task Tiwith schedule TjTiare thus computed by

siˆ maxfri; fjg and fiˆ si‡ cj;i,respectively.

2.2. Real-time disk scheduling problem

Given a set of real-time disk tasks T ˆ fT1; T2;

. . . ; Tng where n is the number of input disk tasks and

the ith disk task Ti is denoted by …ri; di; ti; li; bi†. The

objective of a real-time disk scheduling algorithm is to ®nd a feasible schedule Tzˆ Tz…1†Tz…2†   Tz…n† with

max-imal throughout. The index function z…i†,for i ˆ 1 to n,is a permutation of f1; 2; . . . ; ng. De®ne schedule ®nish-time as the ®nish ®nish-time it takes to serve all input tasks according to their respective timing constraints. Clearly, this is the ®nish-time of the latest task fz…n†. Therefore,

the disk throughput is calculated as follows:

Throughput ˆXn

iˆ1

bz…i†=fz…n†/ …fz…n†† 1: …3†

The obtained disk throughput is related to the inverse of schedule ®nish-time. If the input schedule is completed earlier,more data throughput is obtained. The data throughput improvement of scheduler z compared with scheduler x can be computed as

Throughput improvement

ˆ …1 fz…n†=fx…n††  100%: …4†

Therefore,the problem objective de®ned to maximize throughput can be achieved by minimizing the schedule

®nish-time. We formally formulate the real-time disk scheduling problem as follows.

De®nition 1 (Real-time disk scheduling). Given a set of n real-time disk tasks T ˆ fT1; T2; . . . ; Tng,where the ith

task Tiˆ …ri; di; ti; li; bi†,®nd a feasible schedule Tz ˆ

Tz…1†Tz…2†   Tz…n†that resolves min8zffz…n†g under rz…i†6 sz…i†

and fz…i†6 dz…i† for 1 6 z…i† 6 n.

As mentioned in the preceding subsection,a task's service time depends on the related track distance be-tween its previous task and itself. Thus,it is not ®xed,but is determined by the schedule result. However,the schedule result minimizing schedule ®nish-time is deter-mined by the required service time. As a result,it is hard to design an optimal scheduling algorithm for maxi-mizing data throughput while also guaranteeing real-time constraints. This real-real-time disk scheduling problem has been shown to be NP-complete (Wong,1980). 3. Related works

In past years,various retime disk scheduling al-gorithms have been developed to heuristically employ a seek-optimizing SCAN scheme for an EDF schedule to reduce the disk service time. For example,the well-known SCAN-EDF scheme ®rst schedules disk tasks with the earliest deadlines. If two or more disk tasks have the same deadline,these tasks are serviced ac-cording to their relative track locations,i.e.,by the SCAN algorithm. Since only tasks with the same deadline are seek-optimized,the obtained data throughput improvement is limited. To increase the probability of applying the SCAN algorithm to re-schedule input tasks,DM-SCAN proposed the concept of maximum-scannable-group (MSG) (Chang et al., 1998). An MSG is a set of continuous tasks that can be rescheduled by SCAN without missing their respective timing constraints. Given an EDF schedule T ˆ T0T1   Tn,the MSG Gistarting from task Tiis de®ned as

the sequential tasks Giˆ TiTi‡1Ti‡2   Ti‡m,where task Tj

satis®es following criteria:

fj6 di and rj6 si for j ˆ i to i ‡ m: …5†

By iteratively rescheduling tasks within MSGs,DM-SCAN also proposes an incremental approach to progressively improve disk throughput. However,the rescheduled result will not be in EDF sequence be-cause SCAN is applied to reschedule tasks within each MSG. Since DM-SCAN requires the input tasks based on EDF order,a deadline modi®cation scheme is proposed to modify tasks' deadlines and transfers the rescheduled non-EDF sequence into a pseudo-EDF order. Here,``pseudo'' means that the tasks are or-dered by the modi®ed deadlines. For example,given

(4)

the schedule sequence TiTj,a pseudo-deadline ds…i† is

derived as ds…i†ˆ minfdi; ds…j†g. Fig. 1 presents a simple

example to illustrate the deadline modi®cation scheme.

The original input T ˆ T1T2T3T4T5 is not an EDF

schedule because we have d2> d3 and d4> d5.

Tra-versing from the last task T5 to the ®rst task T1,if any

task has its deadline larger than that of its previous task,the deadline modi®cation scheme is applied. For

example, d4 is larger than d5 and is modi®ed equal to

d5 in order to satisfy the EDF requirement. Following

the same procedure, d2 and d1 are also modi®ed. Note

that,although d1< d2 in the original input schedule,

d1 is also modi®ed as the value of d1 is larger than

that of modi®ed pseudo-deadline d2. Clearly,the

modi®ed pseudo-deadlines are smaller than the

origi-nal ones. In addition,although only two tasks (T2 and

T4) violate the EDF order,three tasks …T4; T2; and T1)

have their deadlines modi®ed to meet EDF sequence. Transferring the rescheduled non-EDF ordered se-quence into a pseudo-EDF one by deadline modi®-cation scheme,DM-SCAN iteratively reschedule tasks from the derived pseudo-EDF schedule to obtain more data throughput.

4. RG-SCAN

From the preceding section,we can see the draw-backs of the deadline modi®cation scheme,where the modi®ed deadlines are smaller than the original ones. Therefore,the group size for rescheduling is narrowed down and number of tasks that can be rescheduled is decreased. Moreover,some tasks su€er from the dead-line modi®cation scheme,even though their deaddead-lines are ordered in EDF sequence. To resolve these draw-backs,in this paper a new real-time disk scheduling algorithm called RG-SCAN using the concept of R-Group is proposed. Given any input tasks set,con-secutive tasks that can be rescheduled under real-time constraints can be directly derived by the concept of R-Group.

De®nition 2 (R-Group (Reschedulable-Group)). Given a set of real-time disk tasks T ˆ T1T2   Tn,the R-Group

Gi is de®ned as the maximum number of continuous

tasks Giˆ TiTi‡1   Ti‡m with each task Tk for k ˆ i to

i ‡ m satis®es fi‡m6 mini‡mkˆifdkg and maxi‡mkˆifrkg 6 si.

Fig. 2 presents a simple example to illustrate the concept

of R-Group. For example,to calculate R-Group G2,we

have f36 min3kˆ2fdkg ˆ d3 and max3kˆ2 frkg ˆ r36 s2.

But f4> min4kˆ2fdkg ˆ d3 and s2< max4kˆ2frkg ˆ r4.

Therefore, G2ˆ T2T3. Following the same procedure,

other R-Groups can be derived as G1ˆ T1T2; G3ˆ T3,

and G4ˆ T4T5,respectively. Note that,the input

schedule is not an EDF sequence. The following simple example shows the di€erent schedules obtained by DM-SCAN and RG-DM-SCAN,respectively.

Example 4.1. Let S ˆ T1T2T3T4T5 be the input schedule

(for example,the rescheduled result of the ®rst iteration) with …r1; d1† ˆ …1; 10†, …r2; d2† ˆ …1; 11†, …r3; d3† ˆ …3; 15†,

…r4; d4† ˆ …6; 16† and …r5; d5† ˆ …5; 14†. Their track

loca-tions are 30,12,56,33 and 36. Assume that the initial disk head is located at track 0. The associated start-times and ®nish-start-times are …s1; f1† ˆ …1; 5†, …s2; f2† ˆ

…5; 7†, …s3; f3† ˆ …7; 12†, …s4; f4† ˆ …12; 15† and …s5; f5† ˆ

…15; 16†. The rescheduled results obtained using DM-SCAN and RG-DM-SCAN are as follows:

· DM-SCAN: Since the deadlines of input tasks are not ordered incrementally,i.e.,not in EDF sequence,the deadline modi®cation scheme is applied in DM-SCAN. After applying the deadline modi®cation scheme,the new obtained ready times and deadlines are …r1; d1† ˆ …1; 10†, …r2; d2† ˆ …1; 11†, …r3; d3† ˆ

…3; 14†, …r4; d4† ˆ …6; 14†,and …r5; d5† ˆ …5; 14†. By

fol-lowing Eq. (5),the obtained R-Groups,i.e.,MSGs, are G1ˆ T1T2, G2ˆ T2, G3ˆ T3, G4ˆ T4,and G5ˆ

T5. Because G1ˆ T1T2 can be rescheduled as T2T1

(since the initial disk head is located at track 0) to minimize the seek time,thus the output schedule is T2T1T3T4T5.

· RG-SCAN: In contrast,RG-SCAN can identify R-Groups directly from any sequences of input tasks. Therefore,deadline modi®cation is not needed. The

Fig. 1. A simple example to illustrate the deadline modi®cation scheme.

(5)

obtained R-Groups are G1ˆ T1T2, G2ˆ T2,

G3ˆ T3T4, G4ˆ T4,and G5ˆ T5. Since not only

G1ˆ T1T2 but also G3ˆ T3T4 can be rescheduled to

reduce their service time,a better schedule result T2T1T4T3T5 is obtained by RG-SCAN.

As shown in the above example,the R-Group

G3ˆ T3 in DM-SCAN while G3ˆ T3T4 in RG-SCAN.

The RG-SCAN thus identi®es more tasks for resched-uling (called reschedulable tasks) than DM-SCAN, which is shown in the output schedules obtained by DM-SCAN and RG-SCAN,respectively. As stated in Section 1,if more tasks are seek-optimized,more data throughput is obtained. Therefore,RG-SCAN provides more data throughput than that obtained by DM-SCAN. Fig. 3 shows the operation ¯ows of DM-SCAN and RG-SCAN,that is,given a set of tasks,DM-SCAN requires that these tasks must be ordered in EDF se-quence,whereas RG-SCAN has no such limitation. In addition,in DM-SCAN,the iterative approach of pro-gressively improving disk throughput requires the deadline modi®cation scheme to keep tasks in EDF order. However,RG-SCAN identi®es reschedulable tasks directly from the non-EDF input tasks and deadline modi®cation is never needed. Since original deadlines are larger than the modi®ed deadlines,RG-SCAN has larger group size for rescheduling than that obtained by DM-SCAN,as demonstrated by Example 4.1. Therefore,our approach is more ¯exible and ob-tains more throughput improvement than DM-SCAN.

Following we prove that,if an input schedule is fea-sible,the re®ned schedule by rescheduling tasks within a R-Group does indeed improve the data throughput under guaranteed real-time requirements.

Theorem 4.1. Given a set of feasible real-time tasks TY ˆ TY …1†TY …2†   TY …n†with R-Group Giˆ TY …i†TY …i‡1†  

TY …i‡m†. Assume that Siˆ TS…i†TS…i‡1†   TS…i‡m† is the

re-scheduled result of Gi by seek-optimized algorithm for

TSˆ TY …1†TY …2†   TY …i 1†TS…i†TS…i‡1†   TS…i‡m†   TY …n†. Then

TSobtainsmoredatathroughputthanTY underguaranteed

real-time requirements.

Proof. From the de®nition of R-Group Giˆ

TY …i†TY …i‡1†   TY …i‡m†,we have fY …i†6 fY …i‡1†6    6 fY …i‡m†

6 mini‡m

kˆifdY …k†g. Since Siˆ TS…i†TS…i‡1†   TS…i‡m† is the

seek-optimized rescheduled result of Gi,we have

fS…i‡m†6 fY …i‡m†. In addition,for the rescheduled result

in Si; fS…i†6 fS…i‡1†6    6 fS…i‡m†6 fY …i‡m†6 mini‡mkˆifdY …k†g

ˆ mini‡m

kˆi fdS…k†g 6 mini‡mkˆifdS…k†g. Therefore,the

real-time requirements fS…k†6 dS…k† for i 6 k 6 i ‡ m is

guar-anteed. 

Notably,the above proof assumes that the input schedule is feasible. However,our approach may pro-duce feasible rescheduled result even an infeasible schedule is given,although it is not guaranteed. As-sume that T ˆ T1T2   Tn is a set of input tasks; then

because each R-Group Gi is started from task Ti,there

are at most n R-Groups considered …G1; G2; . . . ; Gn†.

For these n R-Groups,we have the overlapping prop-erty,which is shown in Appendix A. In other words, these R-Groups may not be mutually exclusive. If we sequentially serve these n Groups,then earlier R-Group's seek-optimized rescheduled result may be de-stroyed by the later one's. For example,if R-Group G3ˆ T3T4T5T6 and its seek-optimized rescheduled result

R3ˆ T5T6T4T3. From the overlapping property,assume

that R-Group G4ˆ T4T5T6T7. After rescheduling tasks

in G4,the seek-optimized result R4ˆ T7T5T6T4.

Evi-dently,the seek-optimized operation in G4 destroys the

previous seek-optimized order in G3. This disturbs the

algorithm's progression and makes performance of the rescheduled result to be unpredictable. As a result, we select only the mutually exclusive R-Groups for rescheduling and serve them in ®rst-in-®rst-out (FIFO) order.

Therefore,RG-SCAN ®rst identi®es a R-Group and reschedules tasks in it by SCAN; then the next mutually exclusive R-Groups is identi®ed and tasks within it are rescheduled. This process is repeated until the last R-Groups is achieved. However,in addition to the dif-ferent identi®cation scheme from DM-SCAN,once RG-SCAN identi®es an R-Group,it reschedules tasks in the derived R-Group and immediately updates the tasks' start-times and deadlines. Therefore,the identi®cation of remaining R-Groups is based on the more prompt value of start-times and deadlines. In addition,as will be stated in Section 5,the non-real-time tasks can thus be serviced after the identi®cation of an R-Group to min-imize their response time. The algorithm runs iteratively until convergence.

Given a set of n tasks,the time complexity of identi-®ng n R-Groups is O…n log n†. This is achieved by using an AVL tree to keep track of the minimum deadline and maximum ready time in each R-Group. In contrast,the time complexity of identifying n MSGs is O…n†. However, in each iteration,DM-SCAN requires O…n log n† time complexity,which is the same as the time complexity of

(6)

RG-SCAN in each iteration. In other words,both DM-SCAN and RG-SCAN have the same O…n log n† time complexity in each iteration. When new tasks arrive, the time complexity of both schemes is also O…n log n†. 5. Supporting non-real-time tasks

In a multimedia system,although most accesses are for media data,a few non-real-time disk requests are interposed to access conventional ®les. For example,in a video-on-demand (VoD) system,we ®rst search the ar-chive to select the desired video. After that,a continuous retrieval of selected media data is guaranteed for jitter-free playback. Although non-real-time tasks have no deadline constraints,reasonable response time has to be o€ered while guaranteeing the real-time tasks' timing requirements.

Intuitively,non-real-time tasks would be served after the completion of all real-time tasks. However,in this way,non-real-time tasks will be served with an unde-sirably long response time and at worst,be starved of service.

From Theorem 4.1,the data throughput is improved by rescheduling tasks in an R-Group using a seek-op-timized algorithm. In other words,the ®nish time of an R-Group is advanced as Eq. (3) indicates. We obtain the ``slack'' between the advanced ®nish-time and the orig-inal one and use this slack to serve non-real-time tasks. Therefore,non-real-time tasks are served quickly,while still guaranteeing the real-time tasks' timing constraints. Fig. 4 shows how a R-Group is employed to serve non-real-time tasks. Once non-non-real-time tasks arrive,as the current R-Group is under way,we try to serve them in the next R-Group's slack. For example,if a non-real-time task T1arrives during the execution of R-Group G1,

it is served in the slack of the next R-Group G4. If the

slack derived from an R-Group is not large enough to sustain a non-real-time task,we continue to identify the next R-Group and the derived slack is added to the previous one,until the non-real-time task can be served.

For example,the slack derived from R-Group G7is too

small to serve T2. As a result,we serve T2 by the

accu-mulated slack derived from G7 and G11.

Fig. 5 presents the service model for serving mixed real-time/real-time disk workloads. Because non-real-time tasks may arrive faster than a system's capa-bility,an isolated queue is maintained to temporarily hold them. Therefore,there are two separate queues in the system,one for real-time tasks and the other for non-real-time tasks. From the input real-time tasks' queue,we ®rst identify tasks belonging to an R-Group. By rescheduling tasks within the R-Group,slack is de-rived from the reduction of service time. After that,one or more real-time tasks are taken out of the non-real-time task's queue and served within the derived slack until the schedule result is infeasible. If no non-real-time tasks arrive and the queue is empty,the ®nish time of the R-Group is advanced and data throughput of real-time tasks is also improved.

6. Performance evaluation 6.1. Experimental environments

In this section,the experimental results of our pro-posed RG-SCAN algorithm are presented to compare with previous approaches. Table 1 presents some im-portant parameters of HP 97560,which is used as our target disk for performance evaluation (Ruemmler and

Fig. 4. A simple example illustrates the employment of R-Group to serve non-real-time tasks: (a) three non-real-time tasks arrive in the serve of R-Group G1, G4,and G11,respectively; (b) they are served in G4; G11,and G14 by the service time reduction after rescheduling each

R-Group.

Fig. 5. Service model for serving real-time and non-real-time disk tasks.

(7)

Wyllie,1994). Each real-time task is assumed to ask for a track of data (36 KB in HP 97560). The ready times of real-time tasks are randomly generated and their dead-lines are uniform distributed within a proper interval after their corresponding ready times. Non-real-time tasks are assumed to arrive with a Poisson distribution. The mean inter-arrival time between each non-real-time task is varied with di€erent experiments and is described below. The request size of each non-real-time task is assumed to be 4 KB. The workloads of both real-time and non-real-time tasks are uniformly distributed over the disk surface. In all following experiments,100 ex-periments are conducted with di€erent seeds for random number generation.

6.2. Performance of real-time disk scheduling 6.2.1. Number of supported real-time tasks

First,we present the experimental results of di€erent disk scheduling algorithms for serving real-time tasks. There are two metrics to measure the eciency of a real-time disk scheduling algorithm: one is the number of supported tasks,and the other is the data throughput. Given a set of input tasks,the applied disk scheduling algorithm should serve as many tasks as possible. If the same tasks are served,the applied disk scheduling al-gorithm must ®nish the schedule as quickly as possible to maximize data throughput.

Given 100 experiments,Table 2 presents the minimal, maximal,and average number of real-time tasks that are supported by di€erent disk scheduling algorithms. The number of supported tasks n is obtained by increasing the number of input tasks incrementally until the schedule result is infeasible with n ‡ 1 real-time tasks. On average,our proposed RG-SCAN provides 24

real-time tasks,which is better than both DM-SCAN and SCAN-EDF,which support 22 and 18 tasks,respec-tively. Accordingly,identifying task groups for re-scheduling can serve more tasks than only rere-scheduling tasks having the same deadline. This is because the number of reschedulable tasks identi®ed by RG-SCAN or DM-SCAN is much larger than SCAN-EDF. As a result,input tasks' service times are reduced after re-scheduling and more tasks can be served before their deadlines. In addition,RG-SCAN further supports more tasks than DM-SCAN. As stated above,DM-SCAN requires modifying tasks' deadlines for the identi®cation of reschedulable tasks. In contrast,RG-SCAN identi®es reschedulable tasks by using the concept of R-Group,which demands no speci®c input sequence,and thus no tasks' deadlines needs to be modi®ed. Because the modi®ed deadlines are smaller than the original deadlines,RG-SCAN thus identi®es more number of reschedulable tasks than DM-SCAN. As a result,the further reduction of tasks' service times prompts more tasks to be supported by RG-SCAN. 6.2.2. Data throughput improvement

If the same real-time tasks are served,then the ap-plied disk scheduling algorithm must maximize data throughput,i.e.,minimize schedule ®nish-time,to commodate the huge volumes of multimedia data ac-cess. Fig. 6 shows the data throughput improvement of RG-SCAN and DM-SCAN under di€erent number of EDF tasks. The data throughput improvement is com-pared with SCAN-EDF. For each bar in Fig. 6,100 experiments were applied and the average throughput improvement is used for measurement. From the ex-perimental results,the data throughput improvement obtained by RG-SCAN is always better than that ob-tained by DM-SCAN,no matter how many tasks are applied in the input schedule. This demonstrates the eciency of RG-SCAN over DM-SCAN. For example, with 15 real-time tasks,the data throughput improved

Table 2

The minimal,maximal,and average number of supported real-time task with di€erent scheduling policies

Algorithms Number of supported tasks

Min Max Average RG-SCAN 20 27 24 DM-SCAN 20 26 22

SCAN-EDF 14 22 18 Fig. 6. The data throughput improvement of DM-SCAN and RG-SCAN under di€erent number of input tasks. Table 1

Disk parameters of HP 97560 No. of cylinders per disk 1972 No. of tracks per cylinder 19 No. of sectors per track 72 Sector size 512 bytes

Seek-time function (ms) Seek…d† ˆ 3:24 ‡ 0:4pd; d 6 383; 8:00 ‡ 0:008d; d > 383 

Revolution speed 4002 rpm Transfer time 10 MBps

(8)

by RG-SCAN is 1.1 times DM-SCAN's. Although input tasks are EDF-ordered,the deadline modi®cation scheme adopted in DM-SCAN advances tasks' dead-lines and restricts the group size for rescheduling. In contrast,the RG-SCAN automatically identi®es re-schedulable tasks within an R-Group from any input tasks set. No deadline modi®cation is required and the obtained number of reschedulable tasks is guaranteed to be larger than DM-SCAN. Therefore,RG-SCAN can provide more data throughput than DM-SCAN.

In addition,from Fig. 6,we observe that the throughput improvement of RG-SCAN is more signi®-cant than that of DM-SCAN if more tasks are served. Because more tasks are served,the deadline modi®ca-tion scheme used in DM-SCAN will modify more tasks' deadlines and narrow down the group size for resched-uling. In contrast,RG-SCAN assumes no speci®c input sequence and no tasks' deadlines are modi®ed. There-fore,RG-SCAN performs well with an increased num-ber of input tasks. In multimedia system design,more and more simultaneous streams are provided to support the increasing number of client viewers. Therefore,the improvement of our proposed approach will be superior to DM-SCAN with advances in multimedia systems' design technologies.

6.3. Non-real-time task's performance

6.3.1. Number of supported non-real-time tasks

Secondly,we measure non-real-time task's perfor-mance supported by di€erent disk scheduling algorithms in a real-time environment. Given a set of real-time tasks,a well-behaved disk scheduling algo-rithm should support as many non-real-time tasks as possible,while guaranteeing the timing constraints of real-time tasks. In addition,the applied disk scheduling algorithm must o€er good response time for non-real-time tasks to stay below some user-tolerance threshold.

Assuming that there are 20 real-time tasks,Table 3 shows the minimal,maximal,and average number of non-real-time tasks supported by RG-SCAN and DM-SCAN. The mean inter-arrival time of non-real-time tasks is assumed to be 10.1 ms,which saturates the non-real-time task's queue to avoid the occurrence of an empty queue. The queuing principle for non-real-time tasks is followed using FIFO order. Note that,by exploiting the SCAN order in R-Groups,other queu-ing principles exist to reduce average response time of real-time tasks. For example,we can select non-real-time tasks that incur minimum seek time with the tasks in an R-Group. In this paper,we select FIFO for its simplicity and fairness. Table 4 shows the same results,but with 30 real-time tasks. We also present the minimal,maximal,and average schedule ®nish-time of various disk scheduling schemes for comparison. Note that the schedule ®nish-times of RG-SCAN and DM-SCAN include both the execution of real-time and non-real-time tasks.

Tables 3 and 4 show that RG-SCAN serves more non-time tasks than DM-SCAN in the same real-time environment,i.e.,having the same real-real-time tasks. Without the requirement to modify tasks' deadlines, RG-SCAN obtains larger group sizes,i.e.,more re-schedulable tasks,for rescheduling. The slack between advanced ®nish-time and original ®nish-time in RG-SCAN is thus larger than in DM-RG-SCAN. Therefore, more non-real-time tasks have the chance to be served within the obtained slack by RG-SCAN. In addition, both RG-SCAN and DM-SCAN supporting non-real-time tasks have comparable schedulable ®nish-non-real-times with SCAN-EDF. That is,non-real-time tasks sup-ported by RG-SCAN and DM-SCAN,together with their real-time tasks,have almost the same schedule ®nish-time as SCAN-EDF,which only serves real-time tasks. Especially,the average schedule ®nish-time of RG-SCAN under 30 real-time tasks has smaller value

Table 4

Given 30 real-time tasks,the schedule ®nish-time and number of supported non-real-time tasks of di€erent approaches Algorithm Schedule ®nish-time (ms) Number of non-real-time tasks

Min Max Avg. Min Max Avg.

RG-SCAN 522.98 552.38 537.68 7 9 8

DM-SCAN 535.36 548.88 542.12 6 7 6

SCAN-EDF 530.59 559.71 545.15 NA NA NA Table 3

Given 20 real-time tasks,the schedule ®nish-time and number of supported non-real-time tasks of di€erent approaches Algorithm Schedule ®nish-time (ms) Number of non-real-time tasks

Min Max Avg. Min Max Avg.

RG-SCAN 289.25 333.34 313.17 0 8 3

DM-SCAN 289.25 333.34 311.66 0 5 2

(9)

than that of SCAN-EDF,while RG-SCAN simulta-neously supports an average of eight non-real-time tasks.

In Table 3,we support one more non-real-time task than DM-SCAN,and the number of supported non-real-time tasks is smaller than that of non-real-time tasks. As stated in Section 5,in a multimedia system,most disk accesses are real-time demanded for media playback. Only a few non-real-time tasks are interposed for ordi-nary ®le access. Therefore,our scheme serves 1.5 times the number of non-real-time tasks supported by DM-SCAN and we believe that this is valuable due to the small number of non-real-time tasks in a multimedia system. In addition,from Tables 3 and 4,the number of supported non-real-time tasks is increased with that of real-time tasks in systems. Therefore,the number of supported non-real-time tasks by RG-SCAN relates with the increase of real-time tasks and o€ers good scalability in a multimedia system. Furthermore,the techniques we propose in this paper can cooperate with other approaches (Spuri and Buttazzo,1994; Lehoczky et al.,1987; Lehoczky and Ramos-Thuel,1992) to fur-ther improve the performance for supporting non-real-time task.

6.3.2. Response time

Responsiveness is an important factor measuring the performance of disk scheduling algorithms for the sup-port of non-real-time tasks. In this subsection,we pre-sent the response time of non-real-time tasks using RG-SCAN and DM-RG-SCAN. 100 experiments are conducted for each approach and the mean inter-arrival time of non-real-time tasks is assumed to be 50.1 ms. In Table 5, using di€erent numbers of real-time and non-real-time tasks,we present non-real-time task's average response time under RG-SCAN and DM-SCAN. From the ex-perimental results,our proposed RG-SCAN scheme o€ers shorter response time than DM-SCAN. For ex-ample,with 25 real-time and 4 non-real-time tasks,RG-SCAN provides a reduction of 7.6% of DM-tasks,RG-SCAN's response time.

As explained above,RG-SCAN has larger group sizes for rescheduling than DM-SCAN,and the service time's reduction of rescheduling tasks in RG-SCAN is larger than in DM-SCAN. Thus,RG-SCAN will obtain enough slack to quickly serve non-real-time tasks and shorten their response times. However,we observe that the response time improvement is actually not very

signi®cant compared with DM-SCAN. This is because, in some cases,the slack obtained by rescheduling the fewer real-time tasks by DM-SCAN is just large enough to serve non-real-time tasks. On the other head,RG-SCAN obtains larger group size and postpones non-real-time task's execution to wait for the completion of more real-time tasks. This limitation can be resolved by rescheduling real-time and non-real-time tasks together within an R-Group. As shown in Fig. 4,the serving of non-real-time tasks is put on the end of an R-Group. By rescheduling non-real-time and real-time tasks together, the response times of non-real-time tasks are reduced. Thus,the total service time is decreased,and more non-real-time tasks can be served. Nevertheless,this requires rescheduling by SCAN each time a non-real-time task is tested for schedulability,which increases the time com-plexity. However,on average,RG-SCAN still provides shorter response time than DM-SCAN.

7. Conclusions

In order to improve disk throughput,a seek-opti-mizing rescheduling scheme is applied as much as pos-sible to disk requests under guaranteed real-time constraints. However,previous approaches limit their ¯exibility and performance since the rescheduling scheme is employed only to an EDF schedule. In this paper,we propose RG-SCAN,a new disk scheduling algorithm using the concept of R-Group,to resolve this drawback. Using this R-Group,consecutive tasks that can be rescheduled under real-time constraints are de-rived from any input tasks set,so no deadline modi®-cation is required. Since original deadlines are larger than the modi®ed deadlines,RG-SCAN obtains a larger task group for rescheduling than DM-SCAN.

In addition,we extend the RG-SCAN algorithm to serve mixed real-time/non-real-time tasks in a multime-dia environment. By rescheduling tasks within an R-Group,slack derived from the reduction of service time is used to serve non-real-time tasks to minimize their response times. The experimental results show that our approach can support more tasks,both real-time and non-real-time,than DM-SCAN. Additionally,our ap-proach can provide larger data throughput and o€er good response time to non-real-time tasks. Further-more,our scheme o€ers good scalability for the support of both real-time and non-real-time tasks. Therefore,

Table 5

Given di€erent real-time and non-real-time tasks,the obtained response time of non-real-time tasks (NRT-Tasks) by RG-SCAN and DM-SCAN Algorithm 20 real-time tasks 25 real-time tasks 30 real-time tasks

NRT-tasks Res. time (ms) NRT-tasks Res. time (ms) NRT-tasks Res. time (ms)

RG-SCAN 2 132.19 4 140.31 6 145.80

(10)

our proposed RG-SCAN can keep pace with the ex-plosive progress of multimedia design technology,per-forming much better than the DM-SCAN approach. Appendix A

Theorem. Given an input schedule T ˆ T1T2   Tn. For

each R-Group Giˆ TiTi‡1   Ti‡m, the sub-group

TpTp‡1   Ti‡mof Giis a part of Gpfor p ˆ i ‡ 1 to i ‡ m.

Proof. Assume that the smallest deadline in a R-Group Giˆ TiTi‡1   Ti‡m is dqˆ mini‡mkˆifdkg.

(a) Since T ˆ T1T2   Tn is the input schedule,we

have si6 si‡1 and fi6 fi‡1for all i.

(b) From the de®nition of R-Group Gi and Giˆ

TiTi‡1   Ti‡m,we have fi‡m6 dqand maxi‡mkˆi frkg 6 si.

) Therefore,from (a) and (b),it can be derived that fi‡m6 dqˆ mini‡mk‡ifdkg 6 mini‡mkˆpfdkg and

maxi‡m

kˆpfrkg 6 maxi‡mkˆifrkg 6 Si6 Sp for p ˆ i ‡ 1 to

i ‡ m. Thus,the sub-group TY …p†TY …p‡1†   TY …i‡m† of

Gi must be a part of Gpfor p ˆ i ‡ 1 to i ‡ m. 

References

Chang,H.P.,Chang,R.I.,Shih,W.K.,Chang,R.C.,2000. Enlarged-maximum-scannable-groups for real-time disk scheduling in a multimedia system. In: Proceedings of the 24th IEEE International Computer Software and Application Conference (COMPSAC), pp. 383±388.

Chang,R.I.,Shih,W.K.,Chang,R.C.,1998. Deadline-modi®cation-SCAN with maximum scannable-groups for multimedia real-time disk scheduling. In: Proceedings of the 19th IEEE Real-Time Systems Symposium,pp. 40±49.

Chen,T.S.,Yang,W.P.,1992. Amortized analysis of disk scheduling algorithm V …R†. Journal of Information Science and Engineering 8 (2),223±242.

Chen,T.S.,Yang,W.P.,Lee,R.C.T.,1992. Amortized analysis of some Disk-Scheduling algorithms: SSTF,SCAN,and N-Step SCAN. BIT 32,546±558.

Dan,A.,Sitaram,D.,Shahabuddin,P.,1994. Scheduling policies for an on-demand video server with batching. In: Proceedings of 2nd ACM Multimedia Conference,pp. 5±22.

Denning,P.L.,1967. E€ects of scheduling on ®le memory operations. In: Proceedings of AFIPS SJCC,pp. 9±21.

Gemmell,D.J.,Christodoulakis,S.,1992. Principles of delay sensitive multimedia data storage and retrieval. ACM Transaction on Information Systems 10 (1),51±90.

Gemmell,D.J.,Vin,H.M.,Kaudlur,D.D.,Rangan,P.V.,Rowe,L.A., 1995. Multimedia storage servers: a tutorial. IEEE Computer 28 (5),40±49.

Je€ay,K.,Stanat,D.F.,Martel,C.U.,1991. On nonpreemptive scheduling of periodic and sporadic tasks. In: Proceedings of Twelfth IEEE Real-Time Systems Symposium,pp. 129±139. Lehoczky,J.P.,Sha,L.,Strosnider,J.K.,1987. Enhanced aperiodic

responsiveness in hard real-time environments. In: Proceedings of 8th IEEE Real-Time Systems Symposium,pp. 261±270.

Lehoczky,J.P.,1990. Fixed priority scheduling of periodic task sets with arbitrary deadlines. In: Proceedings of 11th IEEE Real-Time Systems Symposium,pp. 201±212.

Lehoczky,J.P.,Ramos-Thuel,S.,1992. An optimal algorithm for scheduling soft-aperiodic tasks in ®xed-priority preemptive sys-tems. In: Proceedings of 13th IEEE Real-Time Systems Sympo-sium,pp. 110±123.

Lin,T.H.,Tarng,W.,1991. Scheduling period and aperiodic tasks in hard real-time computing systems. In: Proceedings of ACM SIGMETRICS,pp. 31-38.

Liu,C.L.,Layland,J.W.,1973. Scheduling algorithms for multipro-gramming in a hard real-time environment. Journal of ACM 20 (1), 46±61.

Lougher,P.,Shepherd,D.,1993. The design of a storage server for continuous media. The Computer Journal 36 (1),32±42. Reddy,A.L.N.,Wyllie,J.C.,1993. Disk scheduling in a multimedia I/

O system. In: Proceedings of 1st ACM Multimedia Conference, pp. 225±233.

Reddy,A.L.N.,Wyllie,J.C.,1994. I/O issues in a multimedia system. IEEE Computer 27 (3),69±76.

Ruemmler,C.,Wyllie,J.C.,1994. An introduction to disk drive modeling. IEEE Computer 27 (3),17±28.

Stankovic,J.A.,Buttazzo,G.C.,1995. Implications of classical scheduling results for real-time systems. IEEE Computer 28 (6), 16±25.

Steinmetz,R.,1995. Multimedia ®le systems survey: approaches for continuous media disk scheduling. Computer Communication 18 (3),133±144.

Spuri,M.,Buttazzo,G.C.,1994. Ecient aperiodic service under earliest deadline scheduling. In: Proceedings of 15th IEEE Real-Time Systems Symposium,pp. 2±11.

Wong,C.K.,1980. Minimizing expected head movement in one dimension and two dimensions mass storage system. Computer Survey 12 (2),167±178.

Hsung-Pin Chang received the B.S. and M.S. degree in Computer and Information Science in 1995,and 1997,respectively,from National Chiao Tung University,Taiwan,ROC. He is currently a Ph.D. can-didate in Computer and Information Science at National Chiao Tung University. His research interests include real-time system,operating system,and wireless communication.

Dr. Ray-I Chang is a member of Computer Systems and Communi-cations Laboratory (CSCL) in Institute of Information Science (IIS), Academia Sinica,Taiwan,ROC. He earned his Ph.D. degree in Elec-trical Engineering and Computer Science from National Chiao Tung University in 1996,where he was a member of Operating Systems Laboratory. At CSCL of IIS,Dr. Chang has worked on the projects of real-time trac engineering,video-on-demand server,and distributed digital library design. His current research interests include real-time and distributed multimedia systems. He has published over 50 scienti®c papers in the international journals and conferences. Dr. Chang is a member of IEEE.

Wei-Kuan Shih received the B.S. and M.S. degrees in computer sci-ence from the National Taiwan University,and the Ph.D. degree in computer science from the University of Illinois,Urbana-Cham-paign.

He is an Associate Professor in the Department of Computer Sci-ence at the National Tsing Hua University,Taiwan. His research in-terests include real-time systems,VLSI design automation,and wireless communication. From 1986 to 1988,he was with the Institute of Information Science,Academia Sinica,Taiwan.

Ruei-Chuan Chang received the B.S. degree in 1979,the M.S. degree in 1981,and his Ph.D. degree in 1984,all in computer science from National Chiao Tung University. In August 1983,he joined the De-partment of Computer and Information Science at National Chiao Tung University as a Levcturer. Now he is a Professor of the De-partment of Computer and Information Science. He is also an Asso-ciate Research Fellow at the Institute of Information Science, Academia Sinica,Taipei.

數據

Fig. 2 presents a simple example to illustrate the concept
Fig. 3. The operation ¯ows of DM-SCAN and RG-SCAN.
Fig. 5 presents the service model for serving mixed real-time/real-time disk workloads

參考文獻

相關文件

The schedulability of periodic real-time tasks using the Rate Monotonic (RM) fixed priority scheduling algorithm can be checked by summing the utilization factors of all tasks

Reading: Stankovic, et al., “Implications of Classical Scheduling Results for Real-Time Systems,” IEEE Computer, June 1995, pp.. Copyright: All rights reserved, Prof. Stankovic,

Tei-Wei Kuo, Embedded System and Wireless Networking Lab, National Taiwan University.. Real-Time

OurChain stands for all your blockchains, an autonomous platform for any blockchain, including a ChainAgent, a ChainBrowser, a ChainFoudry, a Ch ainOracle and an OurCoin with

Although many excellent resource synchronization protocols have been pro- posed, most of them are either for hard real-time task scheduling with the maxi- mum priority inversion

Note that if the server-side system allows conflicting transaction instances to commit in an order different from their serializability order, then each client-side system must apply

In the development of data acquisition interface, matlab, a scientific computing software, was applied to acquire ECG data with real-time signal processing.. The developed

Muraoka, “A Real-time Beat Tracking System for Audio Signals,” in Proceedings of International Computer Music Conference, pp. Goto, “A Predominant-F0 Estimation Method for