• No results found

Continuous Media Tasks Scheduling Algorithm

N/A
N/A
Protected

Academic year: 2020

Share "Continuous Media Tasks Scheduling Algorithm"

Copied!
5
0
0

Loading.... (view fulltext now)

Full text

(1)

Continuous Media Tasks Scheduling Algorithm

Myungryun Yoo

Abstract – In this paper the authors propose modified proportional share scheduling algorithm considering the characteristics of continuous media such as its continuity and time dependency. Proposed scheduling algorithm shows graceful degradation of performance in overloaded situation and decreases the number of context switching. Proposed scheduling algorithm is evaluated using several numerical tests under various conditions, especially overloaded situation.

Keywords – Continuous Media, Proportional Share, Scheduling, Overload.

I.

I

NTRODUCTION

Recent advances in computing, storage, and communication technologies have made many exciting multimedia applications possible. Multimedia systems combine a various information sources, such as audio, video, text, graphics and image, into the wide range of application[1]. Video and audio data are referred to as continuous media due to their real time delivery requirements, whereas text, graphics and image data are referred to as discrete media. Since continuous media are displayed within a certain time constraint, their computation and manipulation should be handled under more limited condition than that of discrete media. For example, Continuous media should be completed computation before their predetermined deadlines[2]. Traditional Scheduling Algorithms are not directly applicable, because they are not designed to meet real time constraints.

To handle the continuous media efficiently, the static scheduling policy represented by RM(rate monotonic) [3] and the dynamic scheduling policy represented by EDF(Earliest Deadline First) [3] have been extended[4][5][6][7]. Traditional RM and EDF scheduling algorithms guarantee the optimality in somewhat restricted environments. RM scheduling is one real time algorithm that assigns static priority to the tasks such that tasks with shorter period get higher priorities. And EDF is a dynamic algorithm which schedules the task with the earliest deadline first. The continuous media in these scheduling algorithms based on RM and EDF have hard deadlines of which the miss can be catastrophic. The goal of these scheduling algorithms is to meet all task deadlines and to keep the feasibility of scheduling through admission control[8].

However they have some drawbacks to cope with continuous media related resource utilization and pattern of degradation under the overloaded situation. Firstly, in continuous media of multimedia application, it is not necessary for every instance of a repetitive task to meet its deadline. For continuous media scheduling, slight violence of time limits is not so critical. The dead line constraint is replaced by QoS. This means that QoS is more important

factor than the time delay of the systems for continuous media. The users do not recognize the time delay at all if they do not recognize nor do not feel any change during 50msec. This introduces the trade-off between keeping strict real time constraints and utilizing resources of systems. By using the QoS factor, more flexibility in scheduling processes can be considered under the overloaded situation without loss of user’s satisfaction. Secondly, RM and EDF scheduling algorithms are required the strict admission control to prevent unpredictable behaviors when the overloaded situation occurs[8]. The strict admission control may cause low utilization of resources[9].

Other scheduling methods for continuous media are modification of stride scheduler underlying proportional share mechanisms[10][11]. The stride schedulers which are designed to general tasks guarantee the fairness of resource allocation and predictability. Rate regulating proportional share scheduling algorithm based on stride scheduler is proposed for continuous media. In this research, to specify timing requirements of continuous media, a pair of parameters (P,C) is introduced. P means the task’s period and C means the computation time needed over each period. The key concept of Rate regulating proportional share scheduling algorithm is rate regulator which prevents tasks from receiving more resource than its share in a given period[9]. This algorithm loses fairness which is strong point of stride scheduler and does not show graceful degradation of performance under overloaded situation.

From above, the authors propose new algorithm, namely MPSSA(modified proportional share scheduling algorithm) considering the characteristics of multimedia data such as its continuity and time dependency. Proposed scheduling algorithm shows graceful degradation of performance in overloaded situation and fewer the number of context switching than that of rate regulating proportional share scheduling algorithm[9].

The rest of this paper is organized as follows. In section 2, we explain the purposes of MPSSA. In section 3, we describe our approach for scheduling continuous media. In section 4, we present the result of several numerical tests for performance measurement. The paper concludes with section 5.

II.

M

ODIFIED

P

ROPORTIONAL

S

HARE

S

CHEDULING

A

LGORITHM

(MPSSA)

A.

Rate Regulating Proportional Share Scheduling

Algorithm

(2)

= current start i k i

Alloc()

of RRPSSA[9], the rate regulator, is also used in our MPSSA.

Rate regulating proportional share scheduling algorithm based on stride scheduler is proposed for continuous media. To specify timing requirements of continuous media, a pair of parameters (P,C) is introduced. P means the task’s period and C means the computation time needed over each period.

Three parameters are used in this scheduling algorithm: ticket, stride, and pass. The ticket is C/P and represents the relative amount of resource that should receive. The stride is inversely proportional to ticket and represents the interval between selections. The pass represents the virtual time index for next selection and has the same value as stride at the first stage. The task with the minimum pass is selected, and its pass is advanced by its stride[10][11].

The rate regulator, the key concept of this scheduling algorithm, prevents certain tasks from taking more resources than its share for a given period. It can be represented as equation (1).

k k current start i k P C T i Alloc ≤ ∆

= ) ( (1)

In this inequality,

: the total number of allocations that task has received during the start to current time,

(k∈the set of tasks) T

∆ : the time duration from the start to the current time

Ck : the computation time of taskk

Pk the period of taskk

RRPSSA contributes to process the scheduling of a continuous media. This algorithm considers time dependency of continuous media and it keeps fairness of resource allocation in normal situation.

B. MPSSA

Even though the merits of RRPSSA, it has some difficulties to adapt continuous media as follows. Firstly, this algorithm does not show graceful degradation of performance under overloaded situation. It is shown as if it kept fairness for number of time quantum which is not served from scheduler. However it loses fairness for ratio of time which is not served from scheduler, per task’s computation time. In other words, the weights of one unserved time quantum are different between long and short computation time tasks.

Secondly, this algorithm also has the possibility of avoidable context switching overhead. It means that rate regulator can cause unnecessary context switch in task schedule. Since the context switching overheads are machine dependent factors, which are page size, memory cycle time, number of resister, type of instruction format, and etc. The portion of context switching overhead can be relatively small and they are seldom considered in many scheduling algorithm design. When systems schedule many number of tasks, excessive context switching induces the trashing due to hot conflicts for system, and

resources among tasks can cause serious degradation of system performance.

To advance above two drawbacks, the following points are focused in MPSSA.

i) graceful degradation of performance under overloaded situation.

ii) the elimination of avoidable context switching overhead.

iii) the advance of admission control that may cause deteriorated resource.

III.

S

OLUTION

M

ETHODS OF

MPSSA

A. Resource Allocation Criterion

Ticket represents the relative amount of resource that should receive. It can be defined as equation (2). It could consider the ratio of resource allocation not only in normal situation but in overloaded situation.

(2)

In this equation,

k : the number of tasks

Ck : the computation time of taskk Pk : the period of taskk

Pass represents the virtual time index for next selection. It is 0 at the first stage and is updated as equation (3) in every time quantum

T i Alloc Ticket t Pass current start i k k

k = −

= ) ( ) ( (3)

In this equation,

t : current time

∑ = current start i ki

Alloc() : the total number of allocations that task

has received during the start to current time,

(k∈the set of tasks) T

∆ : the time duration from the start to the current time

B. Task Selection

In previous time quantum, the selected task has preferential right to scheduler and if it will not violate the upper bound of rate regulator, it is selected again. If not, other task with maximum pass will be selected.

By the equation (2) and (3), the rate regulator of MPSSA can be defined in equation (4).

k

k t Ticket

Pass ( ) < (4)

We can decrease the number of context switch using this policy of preferential right.

C.

Flowchart of MPSSA

(3)

Fig. 1. Flowchart of MPSSA

From flowchart, the task’s ticket and pass are determined by its period and computation time. And scheduler selects a task by using task’s ticket and pass. During scheduling, we can decrease the number of context switch as explanation of section 3.2 and show the graceful degradation of performance using tickets which considered the rate regulating overloaded situation as shown equation (2).

For the explanation, three sample tasks which are represented by (C,P). The first one is (1,5), second is (2,4), and third is (2,6). They are scheduled by MPSSA and the result is shown in Table1 . In Table1, task A, B and C are scheduled by using their pass. And scheduler keeps fairness of resources allocation in normal condition.

Table1. Example of MPSSA ticket, A : B : C = 0.19 : 0.48 : 0.32

time pass selected Task

1 0.00 0.00 0.00 B

2 0.19 -0.52 0.32 C

3 0.19 -0.02 -0.18 A

4 -0.14 0.15 -0.01 B

5 -0.06 -0.02 0.07 C

6 -0.01 0.08 -0.08 B

7 0.03 -0.02 -0.01 A

8 -0.09 0.06 0.04 B

9 -0.06 -0.02 0.07 C

10 -0.03 0.04 -0.01 B

11 -0.01 -0.02 0.02 C

… … … … …

IV.

N

UMERICAL

T

ESTS

For the validation of MPSSA, several numerical tests are performed. We examine two aspects of the scheduler:

graceful degradation of performance under the overloaded situation and the number of context switching. Experiments are carried out under normal situation and overloaded situation.

A.

Normal Situation

For the number of context switch, we compare our approach with RRPSSA under normal situation. Table 2 represents computation times and periods of tasks which scheduled under normal situation. And Table 3 represents results of experiment.

Table 2. Samples tasks for scheduling under normal situation

Task Computation Time Period

A 5 20

B 10 50

C 20 60

Table 3. Comparison for #of context switch during 1000 time quanta

Scheduler The number of context switch

RRPSSA 604

MPSSA 545

Table 3 shows that the number of context switching decreases about 10% in our approach than rate regulating proportional share scheduling algorithm.

B.

Overloaded Situation

In overloaded situation, we compare our approach with RRPSSA again. We investigate graceful degradation of performance additional to context switching overhead.

Table 4 represents computation times and periods of tasks which scheduled under overload situation. Table 5 represents results of experiment for context switching overhead. And the results of degradation of performance are illustrated in Figure 2. In Figure 2, (a),(b),(c) and (d) represent each loss rates of task A,B,C and D. Loss rate is ratio of time which is not served from scheduler, per task’s computation time. In other words, the small range of loss rate means that variation of loss rate is small. Table 6 represents the maximum value, the minimum value, average and variation of tasks’ loss rate.

Table 4. Samples tasks for scheduling under overloaded situation

Task Computation Time Period

A 23 100

B 68 150

C 35 100

(4)

Table 5. Comparison for #of context switch during 1000 time quanta

Scheduler The number of context switch

RRPSSA 998

MPSSA 919

(a) task A

(b) task B

(c) task C

(d) task D

Fig. 2. The loss rate of tasks

Table 6. Statistics of loss rate

Loss Rate A B C D

Max RRPSSA 0.391 0.324 0.343 0.391

MPSSA 0.333 0.324 0.343 0.348

Min RRPSSA 0.303 0.279 0.314 0.304

MPSSA 0.303 0.309 0.314 0.304

Ave RRPSSA 0.338 0.306 0.328 0.032

MPSSA 0.315 0.316 0.319 0.020

Var RRPSSA 0.0013 0.00025 00019 0.0012

MPSSA 0.00021 0.00005 0.00013 0.00004

Table 6 shows that the number of context switching decreases about 8% in our approach than RRPSSA. Figure 2 shows that a curved line of loss rate in MPSSA is smoother than that in RRPSSA. And Table 6 shows that the variation of loss rate values decreases about 70% in our MPSSA than RRPSSA. It means that MPSSA shows better performance than that of RRPSSA for graceful degradation of performance under overloaded situation.

V.

C

ONCLUSIONS

This paper proposes a modified proportional share scheduling algorithm for continuous media in multimedia application. Our approach is focused as following points.

i) graceful degradation of performance under overloaded situation.

ii) the elimination of avoidable context switching overhead.

iii) the advance of admission control that may cause deteriorated resource.

Although our approach accomplishes above points as showing numerical tests, there are still needs to extend. The authors aim at the implementation of our approach in actual system using real continuous media.

R

EFERENCES

[1] Ming-Syan Chen, “Stream Conversion to Support Interactive Video Playout”, Proc. of IEEEMultimedia Computing and

System, 1995, pp. 73-80. 0

0.1 0.2 0.3 0.4 0.5

1 2 3 4 5 6 7 8 9 10

period

lo

ss

r

a

te

RRPSSA MPSSA

0.24 0.26 0.28 0.3 0.32 0.34

1 2 3 4 5 6

period

lo

ss

r

a

te

RRPSSA MPSSA

0.29 0.3 0.31 0.32 0.33 0.34 0.35

1 2 3 4 5 6 7 8 9 10

period

lo

ss

r

a

te

RRPSSA MPSSA

0 0.1 0.2 0.3 0.4 0.5

1 2 3 4 5 6 7 8 9 10 11 12 13 14

period

lo

ss

r

at

e

(5)

[2] Tsun-Ping J. Babak Hamidzadeh, “Dynamic real time scheduling strategies for interative continuous media servers”, Miltimedia

Systems, vol. 7, no. 2, 1999, pp. 91-106.

[3] Dhall, S. K. and C. L. Liu, “On a real-time scheduling problem,”Operations Research, vol. 26, no. 1, 1978, pp. 127-140. [4] L. Sha, R. Rajkumar, and S. S. Sathaye. “Generalized rate

monotonic scheduling theory”, Proc. of the IEEE, vol. 82, no. 1, 1994, pp.68-82.

[5] Nishigaki, K., M. Yoo, and T. Yokoyama, “A Proposal of Real-Time Scheduling Algorithm based on RM and Schedulability Analysis,”IEICED, vol. J95, no. 6, 2012, pp. 1347-1355. [6] Takeda, A., S. Kato, and N. Yamasaki, “Real-time scheduling

based on rate monotonic for multiprocessors,”IPSJ CPSY, Vol. 2, No. 1,2009, pp. 64–74.

[7] Guan, N. and W. Yi, “Fixed-Priority Multiprocessor Scheduling: Critical Instant, Response Time and Utilization Bound,”IEEE

26th International Parallel and Distributed Processing Symposium Workshops & PhD Forum, 2012, pp. 2470 – 2473.

[8] C. M. Krishna, and Kang G. Shin “Real Time System”, The

McGraw-Hill Companies, Inc. 1997.

[9] Manhee Kim, Hyogun Lee, and Joowon Lee, “A Proportional Share Scheduler for Multimedia Applications”, Proc. of

multimedia computing and systems, 1997, pp. 484-491.

[10] Carl A. Waldspurger, and William E. Weihl, “Stride Scheduling: Deterministic Proportional Share Resource Management”,

Technical Memorandum MIT/LCS/TM-528, 1995.

[11] Carl A. Waldspurger, “Lottery and Stride Scheduling: Flexible Proportional Share Resource Management”, PhD thesis, MIT, September, 1995.

A

UTHOR

'

S

P

ROFILE

Myungryun Yoo

received B.E from Andong National University, Korea in 1994, M.S from Pohang University of science & Technology, Korea in 1996and the first Ph.D. degree from Yeoung Nam University, Koreain 2002. Shereceived the second Ph.D. degree from Graduate School of Information, Production & Systems, Waseda University, Japan in 2006. She joined Tokyo City University as Associate Professor in 2006. Her research field is Real-Time System, Scheduling, Multimedia System, etc.

Figure

figure 1. The process of proposed algorithm is represented in
Fig. 1. Flowchart of MPSSA
Table 5. Comparison for #of context switch during 1000 time quanta

References

Related documents

In this study, we have shown that in Iran, for con­ secutive patients, it is possible to treat extracranial ca­ rotid atherosclerotic disease with percutaneous balloon

Having this in consideration, the aim of this study is to evaluate the effect of the three mentioned substances on sperm quality parameters namely motility and

If the rule moves forward as proposed, it is unlikely that I will be able to absorb both the higher costs resulting from the Department of Labor rule and provide a 50% match to my

claim 19 further comprising means for transferring a call arrival message to the host computer including the call associated data received from the public sWitched

Keywords rural areas, agriculture, agro-food sector, farm household income, rural tourism, Korea Abstract This paper aims to review the role of farm households and the agro-food

As part of the Edwards County Hospital Compliance Program, the Code of Conduct has been adopted by the Board of Directors to provide standards by which all employees

door (entry or cargo) open main gear steering unlocked pk brake set flaps Vs FMS rudder trim &gt; 2 degrees spoilers not forward stab outside green band 1 or 2 warning lights inop 1

Recent academic interest in immigrant and heritage languages and their speakers has largely overlooked adolescent speakers and the support systems they receive in developing