International Journal of Digital Multimedia Broadcasting
Volume 2019 (2019), Article ID 5284968, 7 pages
https://doi.org/10.1155/2019/5284968

Research Article

Dynamic Soft Real-Time Scheduling with Preemption Threshold for Streaming Media

Wenle Wang,¹ Yuan Wang,¹ JiangYan Dai,² and Zhonghua Cao³

¹School of Software, Jiangxi Normal University, Nanchang 330022, Jiangxi, China
²School of Computer Engineering, Weifang University, Weifang 261061, Shandong, China
³School of Software & Communication Engineering, Jiangxi University of Finance and Economics, Nanchang 330038, Jiangxi, China

Correspondence should be addressed to JiangYan Dai; daijyan@163.com

Received 21 September 2018; Revised 19 November 2018; Accepted 3 December 2018; Published 1 January 2019

Guest Editor: Kai Wang

Copyright © 2019 Wenle Wang et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Abstract.

Over the last decades, the advancements in networking technology and new multimedia devices have motivated the research on efficient video streaming mechanisms under wireless. We consider combing soft real-time video streaming scheduling with threshold to minimize the ineffective preemption. Based on the value density and urgency of soft real-time task, the dynamic scheduling with preemption threshold strategy (DSPT) is proposed in the paper. By analyzing the response time and preemption relationship of tasks, the preemption thresholds are assigned. Simulation results show that the DSPT strategy achieves improvements about success rate, delay time, and benefit of the system.

1. Introduction

With the advancements in networking technology and new multimedia devices, video streaming mechanisms under various network and devices have attracted more and more attention. Nowadays, multimedia communications over the internet especially wireless network are the necessarily part of modern life. Many researchers have studied on video streaming management over wireless, including video coding [1–4], network coding [5–8], and wireless communication [9–11]. In wireless networks, video streaming applications are almost the largest consumer of mobile wireless data, so scheduling video streaming in wireless networks is very important.

Video streaming scheduling in wireless networks has been developed for recent years, such as given quality on service mechanisms [12–16] and real-time adaptive [17–19]. Many of video streaming scheduling studies are about hard real-time [20–22] that requires all the packets complete before the deadline; otherwise the packets will be considered invalid and dropped. However, for some actual video streaming media application, the packets of the transmission with delay can still bring a certain service and these packets can be forwarded and represented by soft real-time tasks. The soft real-time task model with value function is also applicable to video streaming with delay [23, 24]. For soft real-time scheduling, task executing under delay-constrained can bring goodput and benefit.

Generally, real-time scheduling can be divided into preemptive scheduling and non-preemptive scheduling according to whether the task can preempt each other or not. In a dynamic network, the preemptive method is more applicable. However, arbitrary preemption between tasks will affect the scheduling performance. Therefore, considering the drawbacks of the two methods, a compromise approach is utilized to limit the arbitrary or invalid preemption by setting preemption threshold. Furthermore, the limited preemption scheduling strategy is a correct choice for improving the performance.

Soft real-time task model is conducted for the video streaming under wireless. We propose a soft real-time threshold preemption scheduling strategy by combining value density and urgency for video streaming in the paper. Simulation results show that the strategy can improve the goodput, reduce the delay, and increase the benefit comparing with the EDF and LSF methods.

In this paper, we only consider the CPU in the system scheduling and ignore the time caused by context switching. We study the video streaming transmission problem of gateway devices in wireless network at the specific level of packets of transport tiers.

Organization. The structure of the paper is organized as follows: Section 2 describes the related work. Section 3 designs the structure of DSPT strategy. Section 4 defines the task model and problem analysis in detail. Section 5 is priority and preemption thresholds description. The details of scheduling based on preemption threshold are introduced in Section 6. The simulation setup and results are given in Section 7. Finally, the conclusions and future work are discussed.

2. Related Work

In wireless networks, the scheduling strategy should ensure high quality. For this purpose, lots of studies were proposed. The works in [1, 2] enabled high-quality HTTP streaming, in which video pre-encoded into segments that can only start to play if all the packet have received. However, much packet lost for video application in the above work. The literature [3] optimized the dynamic HTTP live streaming service by segment adaption. Some literatures proposed video streaming scheduling using video coding with network coding. For example, the literatures [5, 6] optimized video streaming by combining video coding and network coding for P2P network and distributed network, respectively. However, it might suffer from bandwidth inefficiencies because of unrecoverable packets. The work [7] proposed streaming scheduling for multiple server by Markov decision processes, but it had high computational complexity. In [9], the authors designed a crosslayer optimization scheme for dynamic wireless video streaming. However, these methods cannot contain the packet urgency for streaming control.

With the emergence of various networks, the research on heterogeneous wireless networks had been motivated. The literatures [11, 19] studied the concurrent multipath transfer of the capacity-limited heterogeneous wireless platform. Another work [17] proposed a real-time adaptive video streaming deliver method over multiple wireless networks. In [23, 24], delay-constrained video transmission with multiple interface in heterogeneous network was proposed.

Some researchers considered video streaming as hard real-time; that is, the streaming packet missing the deadline will be considered invalid. For example, the literature [20] proposed a feedback-based control approach under hard real-time workload to improve admission rate. In literatures [18, 21], the author studied in hard real-time video stream allocation to improve the utilization of video decoding. Nevertheless, most video streaming data meets the characteristics of soft real-time task, so delay-constrained of video is considered acceptable in applications.

3. DSPT Detail Design

We consider video streaming deliver over wireless networks as soft real-time scheduling. The streaming packet is expressed as task, and its quality and urgency are the metrics in scheduling. The task’s delay will affect the quality. Therefore, we introduced the value to measure the quality. Response time analysis (RTA) is used to test the schedulability of real-time task, and the preemption threshold-based scheduling approach is to reduce invalid preemption among tasks. The scheduling algorithm can effectively reduce the delay and improve the success rate and benefit. The flow diagram of DSPT strategy is shown in Figure 1. In this paper, we assume that the value function of the soft real-time task keeps unchanged in the interval and decreases linearly in the interval. While executing in the interval , the task is not allowed to be preempted in order to protect the execution of the task.

Figure 1: The flow diagram of DSPT strategy.

Contribution 1. We construct the priority assignment function combining value density and urgency, improving the success and quality of task soft real-time scheduling.

Contribution 2. We propose the task scheduling strategy DSPT based on preemption threshold, which can obtain better performance.

4. Task Model and Analysis

Considering video streaming with delay-constrained under wireless, we conduct soft real-time task model in this section.

4.1. Soft Real-Time Task Model

We refer to a task as an aperiodic task model, and the task is soft real-time. This section provides the definitions of soft real-time task model used in the paper.

Task : An aperiodic task is defined as a triple , where ,,, and are the arrival time, the estimated execution time, the relative deadline, and the critical time of task .

Having executed time : denotes that the task has been executing units at time .

Required execution time : denotes the remaining execution time of task . Thus, it meets .

Executable time : is the executable time of the task prior to its deadline , where at the time ().

Soft Executable time : When missed deadline , task can continue to execute until . is the executable time prior to the critical time , that is, .

Slack time : The slack time denotes that the time unit after finish execution until deadline , thus, . remains stable when the task is in execution, and decreases when the task is preempted. Once , the task cannot finish before .

Delay Time : The delay time denotes the finish time of task after . At the time (), it meets .

Priority : is defined as the priority of task . The larger ’s value, the higher ’s priority.

Threshold : is the preemption threshold of task , where .

Value function : defines the value of the system for executing at time , where . The task ’s value will change when keeps executing, and the function is dynamic. will be analyzed in detail in Section 4.

Value density function : is the ratio between and required execution time , that is, . Obviously, is growing with the decreasing of .

4.2. Value and Value Density Function of Soft Real-Time Task

According to assumption, the value function of the soft real-time task at time is defined as

From (1), we can see that when , is stable at ; however when , is linearly diminishing until 0.

Value density function is denoted as

We can see that is not only concerned with but also related to . According to the definition, . As we known, when the task is executing, decreases with the growing of the time . And when the task is blocked, the remains unchanged. The discussion of is as follows:

(1). Within this interval, . When is executing, grows with the decreasing of . While is blocked, remains unchanged.(2). In this interval, can be derived as follows:     From the above expression, the affect part of the is

    Because the task in scheduler can finish without any interference of any other task, . In this case, if the task keeps executing, the molecular part and the denominator part of (3) decrease at the same time. Further analysis is needed:

(1)At time, (3) is recorded as: . When task has executed from , (3) is formulated to . Because , then , where . That is, when task is executing, grows with the decreasing of .(2)When the task is blocked, the molecular part of (3) decreases with the growth of , while the denominator is kept unchanged. Thus, (3) decreases with the growth of . Therefore, Theorem 1 can be obtained.

Theorem 1. While the task keeps executing in the progress, it increases with time .

4.3. Analysis of the Task’s Urgency

The more urgency of the task is, the sooner execution is required.

Definition 2. At any , the urgency of task is defined as .

is affected by , the discussion is as follows:

(1)When remains in execution, does not change with the growing of the time and then remains unchanged.(2)When is blocked, decreases with the growth of , which makes increase.

5. Priority and Preemption Thresholds for Soft Real-Time Tasks

Task scheduling is driven by priority, while task priority function combines value density with urgency.

5.1. The Construction of Task’s Priority Function

Considering the urgency and the benefits of task, task scheduling is based on priority. Only the completed task can gain value, so relative to the value density, the urgency is more important. In system scheduling, the first consideration is system success rate and then is value brought by tasks. It means that urgency is given much greater weight than value density in priority function. Therefore, we use exponential weighting to the urgency while using logarithmic weighting to the value density. The function of priority assignment can be rewritten to

Based on the above analysis of value density and urgency , we can conclude that

(1)When executes at interval , satisfies

    Further analysis is needed:

(1)According to Theorem 1, when keeps running, increases. Because remain unchanged with time growing. Therefore, (5) keeps increasing.(2)Once is preempted, augments as time grows, while remain unchanged, then (5) keeps increasing. Based on above, increases as time at interval .

(2)When executes at , its slack time is and satisfies

(1)In the process of running , with the growing of the time , increases while remains unchanged and then (6) keeps increasing.(2)When has been preempted, with the growing of time , decreases and augments accordingly while reduces. Further discussion of Eq. (6) is needed. At moment , . After task has been executed with , there is , where . And is exponential growth, in which growth rate is faster than ’s logarithmic descent rate significantly. Therefore, increases when grows.

5.2. Preemption Threshold Selection for Task

The selection of preemption thresholds directly affects the scheduling algorithm. We select preemption threshold by analyzing the task’s response time.

Definition 3. Task ’s Effect Job Set is denoted as . During the execution of task , all task of the sets can preempt , which are defined as Effect Job Set (), satisfying .
Response time of task contains two parts: estimated execution time and sum of the remaining execution time of the effect job sets :

By analyzing the response time of , its threshold can be obtained under the condition which can be scheduled. The procedure of preemption threshold selection is shown in Algorithm 1, where is the highest priority task.

1:     Calculate using (7);

2:     ;

3:     WHILE () DO

4:           IF ()

5:             return not scheduled;

6:         ELSE

7:              IF is executing and

8:                  ;

9:                  return ;

10:            ELSE

11:                 Calculate using (7)

12:            END IF

13:          END IF

14:      END WHILE

15:      return

Algorithm 1: Compute .

Obviously, the computational complexity of Algorithm 1 is .

6. Task Scheduling Strategy Based on Preemption Threshold

We propose a limited preemption scheduling strategy DSPT based on preemption threshold, which reduces the blocking time of the tasks by restricting preemption.

Definition 4. Sufficient and necessary conditions of is that task can preempt task .

By Definition 4, if task preempts task , there must be .

Theorem 5. If task and task are not preempted, the following should be satisfied: .

Proof. Supposing that there are two tasks, and , which do not preempt each other, is satisfied.
There are two possible cases:

(1)If , task can preempt task ,(2)If , task may be preempted by task .

Obviously, tasks and can preempt each other, in contradiction with Definition 4. Therefore, Theorem 5 can be proved.

6.1. Scheduling Algorithm Based On Preemption Threshold

The soft real-time dynamic task scheduling based on preemption threshold (DSPT) called Algorithm 1 is to calculate the threshold and determines the scheduling queue dynamically as shown in Algorithm 2.

         : preemption threshold of ;

         : priority of ;

         : ready tasks queue. ,

          is the number of tasks in the queue;

         : task just arriving;

         : task in executing;

         : the highest priority task of ;

1:       arrive;

2:      IF ;

3:          ;

4:           EXECUTE ;

5:       ELSE

6:           Compute using (7);

7:           FOR to DO

8:               Compute using (5);

9:           Compute ;

10:      SORT task in by Desc;

11:    END IF

12:    IF

13:        ;

14:        IF in can’t Finish

15:            ABORT ;

16:        ELSE

17:            ;

18:            ADD to ;

19:            ;

20:        END IF

21:        EXECUTE ;

22:    END IF

Algorithm 2: Task scheduling.

6.2. Algorithm Complexity

There is only one loop in Algorithm 2, that is, the 7th step is the loop of the length that is equal to the number of tasks in the ready queue. Thus, the computational complexity of the Algorithm 2 is , and the computational complexity of the whole scheduling algorithm is .

7. Simulations and Analysis

7.1. Simulation Experiments

The experiment platform’s CPU is Intel dual-core 2.8 GHZ processor, and the memory is 8 GB. The operating system is Ubuntu Linux, and the source code is implemented by C language.

In the experiment, we consider the aperiodic soft real-time task. Any task ’s arrival time obeys Poisson distribution () and the estimated execution time is subject to average distribution. Therefore, its relative deadline is average distribution, its critical time is , and its value is randomly selected between .

Performance indicators are included as follows:

(1)Systematic success rate (SSR):

    where denotes as the number of successful tasks and represents the number of system overages.(2)Average task latency rate ATDR:

    where denotes the successful task set and and denote execution latency and execution time of the success task .(3)Effective utilization Rate (EUR):

    where denotes as the CPU time for successful tasks and represents the total CPU time in scheduling.(4)Cumulative Value (CV):

    where denotes the successful task set and represents the value of the task .

7.2. Performance Analysis

Under soft real-time environment, the preemptive threshold scheduling strategy is compared with Earliest Deadline First (EDF) method and Least Slack First (LSF) method, and the simulation results and performance are analyzed as follows.

(1) Figure 2 shows simulation results for SSR scheduled by DSPT, EDF and LSF. The task’s arrival interval is represented on the horizontal axis, and the vertical axis is SSR. When the arrival interval of the task is very short, the preemption among the tasks causes the SSR to be low. With the increasing of arrival interval, the preemption among tasks decreases and the SSR arguments. From Figure 2, SSR is sorted in descending order followed by DSPT, LSF, and EDF. This is due to the EDF algorithm chooses task with earliest deadline but not most urgent, which can lead to many tasks fail. While the LSF algorithm always chose the task with the shortest slack time dynamically, its unrestricted preemption causes the thrashing which can make lots of task fail. The DSPT can adapt to the system environment dynamically, and its preemption threshold can avoid the invalid preemption among tasks. (2) The simulation results of ATDR are shown in Figure 3, in which the ATDR is on the vertical axis and arrival interval is on the horizontal axis. It can be seen from Figure 3, the ATDR decreases since the arrival interval grows from 2.5, while ATDR is lower because the intervals among tasks are so short that many of these are dropped to 1.0. Moreover, EDF algorithm leads to the highest ATDR, while the DSPT method produces the lowest ATDR. Because the EDF algorithm always chooses the task with earliest deadline of slack time to execute, many tasks miss the deadline and delay. Relative to the EDF method, the LSF algorithm assigns the most urgency task to execute in time. But its unconstrained preemption may cause serious thrashing among tasks under system overload and this increases the ATDR. The DSPT approach chooses the most urgency task to execute, and limits the preemption among the tasks by the threshold, thereby reduces the delay of the task effectively.

Figure 2: SSR results.

Figure 3: ATDR results.

(3) The simulation results for EUR scheduled by EDF, LSF, and DSPT are shown in Figure 4, where the horizontal axis is task’s arrival interval and the vertical axis is EUR. The short arrival interval means intense preemption among tasks, which causes the EUR low. While the arrival interval becomes longer, there are EUR arguments as the tasks’ preemption decreases. From Figure 4, DSPT obtains the best EUR and EDF has the least EUR. Because the EDF algorithm always execute the task with earliest deadline, which causes more invalid CPU utilization than LSF along with the task failure. The DSPT using preemption threshold can improve the EUR through reducing invalid preemption of tasks.

Figure 4: EUR results.

(4) Figure 5 plots the system’s CV as arrival interval grows. It can be seen from Figure 5, the CV increases when the arrival interval of tasks increases. DSPT obtains the highest CV, because it assigns higher executing priority of the task with high value density. The LSF method produces better CV than EDF method, because under the same system load, that more tasks finish augments CV obtained with the formal approach.

Figure 5: CV results.

8. Conclusions and Future Works

In this paper, we consider video streaming scheduling in wireless networks as soft real-time scheduling. The soft real-time task model has been constructed to express streaming packet and its quality, measure as value, and urgency metric are explored in scheduling. Response time analysis (RTA) approach has been used to test the task’s schedulability, and preemption threshold has been added to the schedule to release the invalid preemption. The scheduling schema DSPT can constrain the delay and improve the success ratio and benefit effectively.

In future works, we want to apply our scheduling method to practical wireless networks, like 5G net, to test its practical effect. Moreover, the stream scheduling of mixed hard real-time and soft real-time characterizes are also a study work in the next step.

Data Availability

The data, including task’s properties and performance indicators in the experiments, used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

This work was supported by the National Natural Science Foundation of China (NSFC) (Grant nos. 61562044, 41661083) and the Science and Technology Research Project of Jiangxi Provincial Department of Education (Grant nos. GJJ170234, GJJ160781).

References

L. De Cicco and S. Mascolo, “An adaptive video streaming control system: Modeling, validation, and performance evaluation,” IEEE/ACM Transactions on Networking, vol. 22, no. 2, pp. 526–539, 2014.

O. Oyman and S. Singh, “Quality of experience for HTTP adaptive streaming services,” IEEE Communications Magazine, vol. 50, no. 4, pp. 20–27, 2012.

T. C. Thang, H. T. Le, A. T. Pham, and Y. M. Ro, “An evaluation of bitrate adaptation methods for HTTP live streaming,” IEEE Journal on Selected Areas in Communications, vol. 32, no. 4, pp. 693–705, 2014.

L. He and F. Li, “Content and buffer status aware packet scheduling and resource management framework for video streaming over LTE system,” Eurasip Journal on Image and Video Processing, vol. 2017, no. 1, 2017.

A. M. Sheikh, A. Fiandrotti, and E. Magli, “Distributed scheduling for scalable P2P video streaming with network coding,” in Proceedings of the 32nd IEEE Conference on Computer Communications (IEEE INFOCOM '13), pp. 11-12, April 2013.

A. M. Sheikh, A. Fiandrotti, and E. Magli, “Distributed scheduling for low-delay and loss-resilient media streaming with network coding,” IEEE Transactions on Multimedia, vol. 16, no. 8, pp. 2294–2306, 2014.

N. Thomos, E. Kurdoglu, P. Frossard, and M. Van Der Schaar, “Adaptive prioritized random linear coding and scheduling for layered data delivery from multiple servers,” IEEE Transactions on Multimedia, vol. 17, no. 6, pp. 893–906, 2015.

S. Huang, E. Izquierdo, and P. Hao, “Adaptive packet scheduling for scalable video streaming with network coding,” Journal of Visual Communication and Image Representation, vol. 43, pp. 10–20, 2017.

M. Zhao, X. Gong, J. Liang, W. Wang, X. Que, and S. Cheng, “QoE-driven cross-layer optimization for wireless dynamic adaptive streaming of scalable videos over HTTP,” IEEE Transactions on Circuits and Systems for Video Technology, vol. 25, no. 3, pp. 451–465, 2015.

D.-R. Chen, “A real-time streaming control for quality-of-service coexisting wireless body area networks,” Applied Soft Computing, 2017.

Y. Cao, Q. Liu, Y. Zuo, G. Luo, H. Wang, and M. Huang, “Receiver-assisted cellular/wifi handover management for efficient multipath multimedia delivery in heterogeneous wireless networks,” EURASIP Journal on Wireless Communications and Networking, vol. 2016, no. 1, 2016.

C. Sieber, T. Hosfeld, T. Zinner, P. Tran-Gia, and C. Timmerer, “Implementation and user-centric comparison of a novel adaptation logic for DASH with SVC,” in Proceedings of the 2013 IFIP/IEEE International Symposium on Integrated Network Management, IM 2013, pp. 1318–1323, Belgium, May 2013.

S. A. Hosseini, F. Fund, and S. S. Panwar, “(Not) yet another policy for scalable video delivery to mobile users,” in Proceedings of the 7th ACM Workshop on Mobile Video, MoVid 2015, pp. 17–22, USA, March 2015.

S. A. Hosseini and S. S. Panwar, “Restless streaming bandits: Scheduling scalable video in wireless networks,” in Proceedings of the 2017 55th Annual Allerton Conference on Communication, Control, and Computing (Allerton), pp. 620–628, Monticello, IL, USA, October 2017.

Y.-H. Yeh, Y.-C. Lai, Y.-H. Chen, and C.-N. Lai, “A bandwidth allocation algorithm with channel quality and QoS aware for IEEE 802.16 base stations,” International Journal of Communication Systems, vol. 27, no. 10, pp. 1601–1615, 2014.

J. Kim and E.-S. Ryu, “QoS optimal real-time video streaming in distributed wireless image-sensing platforms,” Journal of Real-Time Image Processing, vol. 13, no. 3, pp. 547–556, 2017.

M. Xing, S. Xiang, and L. Cai, “A real-time adaptive algorithm for video streaming over multiple wireless access networks,” IEEE Journal on Selected Areas in Communications, vol. 32, no. 4, pp. 795–805, 2014.

H. R. Mendis, N. C. Audsley, and L. S. Indrusiak, “Task allocation for decoding multiple hard real-time video streams on homogeneous NoCs,” in Proceedings of the 13th International Conference on Industrial Informatics, INDIN 2015, pp. 246–251, UK, July 2015.

Y. Cao, F. Song, Q. Liu, M. Huang, H. Wang, and I. You, “A LDDoS-Aware energy-efficient multipathing scheme for mobile cloud computing systems,” IEEE Access, vol. 5, pp. 21862–21872, 2017.

P. Dziurzanski, A. K. Singh, and L. S. Indrusiak, “Feedback-based admission control for hard real-time task allocation under dynamic workload on many-core systems,” in Architecture of computing systems---{ARCS} 2016, vol. 9637 of Lecture Notes in Comput. Sci., pp. 157–169, Springer, [Cham], 2016.

W. Wang, Y. Cao, J. Gong, and Z. Li, “CP-TPS: A Real-Time Transaction Processing Strategy Supporting Compensatory Task,” in Proceedings of the 20th IEEE International Conference on Computational Science and Engineering and 15th IEEE/IFIP International Conference on Embedded and Ubiquitous Computing, CSE and EUC 2017, pp. 475–482, China, July 2017.

H. Mendis, N. Audsley, L. Indrusiak et al., “Dynamic and static task allocation for hard real-time video stream decoding on NoCs,” Leibniz Transactions on Embedded Systems, vol. 4, no. 2, pp. 01–25, 2017.

J. Wu, C. Yuen, N.-M. Cheung, and J. Chen, “Delay-Constrained High Definition Video Transmission in Heterogeneous Wireless Networks with Multi-Homed Terminals,” IEEE Transactions on Mobile Computing, vol. 15, no. 3, pp. 641–655, 2016.

J. Wu, C. Yuen, B. Cheng, M. Wang, and J. Chen, “Adaptive Flow Assignment and Packet Scheduling for Delay-Constrained Traffic over Heterogeneous Wireless Networks,” IEEE Transactions on Vehicular Technology, vol. 65, no. 10, pp. 8781–8787, 2016.