• No results found

A REVIEW OF REAL TIME TRANSACTION SCHEDULING USING PREEMPTIVE THRESHOLD

N/A
N/A
Protected

Academic year: 2020

Share "A REVIEW OF REAL TIME TRANSACTION SCHEDULING USING PREEMPTIVE THRESHOLD"

Copied!
12
0
0

Loading.... (view fulltext now)

Full text

(1)

Available Online at www.ijpret.com 131

INTERNATIONAL JOURNAL OF PURE AND

APPLIED RESEARCH IN ENGINEERING AND

TECHNOLOGY

A PATH FOR HORIZING YOUR INNOVATIVE WORK

A REVIEW OF REAL TIME TRANSACTION SCHEDULING USING PREEMPTIVE

THRESHOLD

MISS. B. L. AGASHE1, PROF. S. A. BHURA2

1. 2ND YEAR ME, CSE DEPARTMENT, BNCOE, Pusad.

2. ASST.PROFESSOR, CSE DEPARTMENT, BNCOE, Pusad.

Accepted Date: 05/03/2015; Published Date: 01/05/2015

\

Abstract:Real-time systems are systems that provide correct and timely responses to events

in their environment. The term timely means that the timing constraints imposed on these responses must be met. The real-time software of these systems is typically designed as a set of tasks and a scheduling algorithm that determines the order in which the tasks are executed. In such a setting, the timing constraints on the responses of the system give rise to derived timing constraints on the responses of the tasks. Fixed-priority pre-emptive scheduling (FPPS), which is currently considered to be a de-facto standard for real-time scheduling. The question whether preemptive algorithms are better than non-preemptive ones for scheduling a set of real-time tasks has been debated for a long time in the research community. In fact, especially under fixed priority systems, each approach has advantages and disadvantages, and no one dominates the other when both predictability and efficiency have to be taken into account in the system design. Recently, limited preemption models have been proposed as a viable alternative between the two extreme cases of fully preemptive and non-preemptive scheduling.

Keywords: Real-time systems, Non-preemptive regions, Limited-preemptive scheduling.

Corresponding Author: MISS. B. L. AGASHE

Access Online On:

www.ijpret.com

How to Cite This Article:

B. L. Agashe, IJPRET, 2015; Volume 3 (9): 131-142

(2)

Available Online at www.ijpret.com 132 INTRODUCTION

Real‐time systems typically employ a collection of application tasks or threads that must complete their work within real‐time constraints. Hence, scheduling real-time tasks is complicated work since it requires pre-computed information about the task’s timing properties. Although we know the system’s timing properties, scheduling tasks is highly concentrated mental work. Moreover the system designer is responsible to see that system meets real time constraints. For guaranteeing feasibility of generated scheduling, several static and dynamic priority scheduling algorithms and corresponding schedulability tests are introduced such as Rate-Monotonic (RM), Deadline-Monotonic (DM) and Earliest Deadline First (EDF).

Real‐time systems generally employ preemptive scheduling to guarantee that critical threads get immediate attention, enabling them to meet their deadlines. on the whole, deadline is one of the important aspects of real time systems which have to be carefully understood when we are working with transaction. however, preemptive scheduling can result in significant context switch overhead under certain conditions. We will explore a unique technology called “Preemption‐Threshold Scheduling,” and how it can be used to reduce preemption overhead, while still enabling applications to meet real‐time deadlines.

The Preemption Threshold Scheduling (PTS) is suggested to help fixed-priority scheduling to improve the overall system’s timing performance. The preemption threshold brings one more priority, preemption threshold, to the system. While the regular priority is used when scheduling the task, preemption threshold is used when being preempted by another task. Therefore while meeting task’s deadline, we reduce useless preemption, which frequently occurs with traditional fixed priority scheduling. Preemption Threshold Scheduling slightly lengthen the execution time of higher tasks, but it reduces that of lower tasks. This helps enhancing the response time of overall system.

LITURATURE REVIEW

(3)

Available Online at www.ijpret.com 133

allowing the analysis to derive both safe and precise worst case execution time bounds of preemptively scheduled tasks. They propose a new method to compute valid upper bounds on a task’s worst case execution time (WCET). Their method approximates an optimal memory layout such that the set of possibly evicted cache-entries during preemption is minimized. This set then delivers information to bound the execution time of tasks under preemption in an adopted WCET analysis.

M. Bertogna and S. Baruah[2] presented “Limited preemption EDF scheduling of sporadic task systems,” proposes a limited-preemption scheduling technique will be presented to join the benefits of both preemptive and non-preemptive scheduling. They have designed and analyzed an EDF-based limited-preemption algorithm for scheduling sporadic task systems upon uniprocessor platforms. This limited-preemption algorithm combines beneficial features from both preemptive and non-preemptive EDF. The run-time behavior of preemptive EDF scheduling will be improved, avoiding preemptions that are not needed to satisfy the schedulability of the system. As with preemptive EDF, limited-preemption EDF has low schedulability overhead and is amenable to efficient feasibility analysis; as with non-preemptive EDF, it offers low run-time overhead and is typically able to offer efficient support for mutual exclusion. To evaluate the effectiveness of the proposed algorithm, they performed a series of experiments with various different kinds of randomly generated task sets. They simulated the scheduling of these task sets for a sufficiently large time-interval using EDF and limited-preemption EDF, counting the total number of limited-preemptions for each of the considered algorithms.

R. J. Bril, J. J. Lukkien, and W. F. J. Verhaegh[3] in their paper, “Worst-case response time analysis of real-time tasks under fixed-priority scheduling with deferred preemption revisited” studied the problem of computing a preemptive schedule of equal-length jobs with given release times, deadlines and weights. Our goal is to maximize the weighted throughput, which is the total weight of completed job. They provides a revised analysis, resolving the problems with the existing approaches. The analysis is based on known concepts of critical instant and busy period for FPPS. To accommodate for our scheduling model for FPDS, we need to slightly modify existing definitions of these concepts.

(4)

Available Online at www.ijpret.com 134

real-time systems. The most relevant result that clearly emerges from the experiments is that, under fixed priority scheduling, any of the considered algorithms dominates both fully preemptive and non-preemptive scheduling, even when preemption cost is neglected. Each specific algorithm preemption threshold mechanism has a simple and intuitive interface and can be implemented by introducing a low runtime overhead; however, preemption cost cannot be easily estimated, since the position of each preemption, as well as the overall number of preemptions for each task, cannot be determined offline. Using deferred preemptions, the number of preemptions for each task can be better estimated, but still the position of each preemption cannot be determined off-line. Moreover, simulation experiments clearly show that the FPP(Fixed preemption points) algorithm is the one generating less preemptions and higher schedulability ratios for any task set parameter configurations.

Bipasa Chattopadhyay and Sanjoy Baruah[5] in their paper “Limited-preemption Scheduling on Multiprocessors” have obtained a pseudo-polynomial time schedulability test for limited-preemption scheduling under GEDF(Global Earliest Deadline First). They have shown how to apply this schedulability test to a multiprocessor multi-GPU system with non-preemptive busy-waiting. They have also indicated how further analysis may provide better analytical results for the multi-GPU system model under consideration. A comparison of analytical results under different multi-GPU system models is merited.

R. Ghattas and A.G.Dean[6] in this paper “Preemption threshold scheduling: Stack optimality, enhancements and analysis” investigate using preemption threshold scheduling to minimize stack size. They present a framework for using PTS for hard real-time systems using both static and dynamic priority allocation schemes. They demonstrate the value and memory optimality of PTS and investigate its performance and also present an improvement. They investigate the use of preemption threshold scheduling for hard real-time system with limited RAM. Their primary contribution is to prove the optimality of PTS among all preemption limiting methods for minimizing a system’s total stack memory requirements. They discuss characteristics of PTS and show how to reduce average worst-case response times. They also introduce a unified framework for using PTS with existing fixed-priority (e.g. rate or deadline-monotonic), or dynamic-priority scheduling algorithms (e.g. earliest-deadline first). They evaluate the performance of PTS and our improvements using synthetic workloads and a real-time workload.

(5)

Available Online at www.ijpret.com 135

priorities to tasks in a monotonic relation to their request rates was shown to be optimum among the class of all fixed priority scheduling algorithms. The least upper bound to processor utilization factor for this algorithm is on the order of 70 percent for large task sets. The dynamic deadline driven scheduling algorithm was then shown to be globally optimum and capable of achieving full processor utilization. A combination of the two scheduling algorithms was then discussed; this appears to provide most of the benefits of the deadline driven scheduling algorithm, and yet may be readily implemented in existing computers.

Manas Saksena and Yun Wang[8] Presented “Scalable Real-Time System Design using Preemption Thresholds” a design approach based on preemption threshold scheduling model that simultaneously integrates and subsumes fixed priority preemptive and non-preemptive scheduling models. Using this design approach, unlike those based on fixed priority preemptive scheduling theory, we are able to assess schedulability of designs, and at the same time reduce run-time overheads for implementations. They address the problem of finding a feasible and low-overhead implementation model for a system of tasks. They can reduce the overheads of an implementation by merging several design level tasks into a single thread in the implementation. This reduces context-switching overheads since a context-switch within a thread is essentially free, and thus context-switch costs are only incurred on thread switching.

(6)

Available Online at www.ijpret.com 136

Gang Yao, Giorgio Buttazzo and Marko Bertogna[10] in their paper “Feasibility analysis under fixed priority scheduling with limited preemptions” considered the problem of analyzing the feasibility of a task set with limited preemptions under fixed priority scheduling. They presents the schedulability analysis of real-time tasks with non-preemptive regions, under fixed priority assignments. In particular, two different preemption models are considered: the floating and the fixed preemption point model. Under each model, the feasibility analysis is addressed by deriving simple and effective schedulability tests, as well as an algorithm for computing the maximum length of the non-preemptive regions for each task. Finally, simulation experiments are presented to compare the two models in terms of schedulability.

Fengxiang Zhang, and Alan Burns[11] in their paper “Schedulability Analysis for Real-Time systems with EDF Scheduling” propose new results on necessary and sufficient schedulability analysis for EDF scheduling; the new results reduce, exponentially, the calculation times, in all situations, for schedulable task sets, and in most situations, for unschedulable task sets. For example, a 16-task system that in the previous analysis had to check 858,331 points (deadlines) can, with the new analysis, be checked at just 12 points. There are no restrictions on the new results: each task can be periodic or sporadic, with relative deadline, which can be less than, equal to, or greater than its period, and task parameters can range over many orders of magnitude.

PROBLEM DEFINITION

The question whether preemptive algorithms are better than non-preemptive ones for scheduling a set of real-time tasks has been debated for a long time in the research community. In fact, especially under fixed priority systems, each approach has advantages and disadvantages, and no one dominates the other when both predictability and efficiency have to be taken into account in the system design. A general disadvantage of the non-preemptive discipline is that it introduces additional blocking time in higher priority tasks, so reducing schedulability on the other hand arbitrary preemptions can introduce a significant runtime overhead and may cause high fluctuations in task execution times, so degrading system predictability.

(7)

Available Online at www.ijpret.com 137

used to select the most appropriate scheduling scheme to increase the efficiency of time-critical real time systems without sacrificing predictability.

PROPOSED SYSTEM

The limited preemptive threshold scheduling approaches proposed to handle limited preemptive scheduling. The task model and the terminology adopted which presents the schedulability analysis for the non-preemptive task model. The Analysis of preemption thresholds model reports and discusses some simulation results and states our conclusions. All schedulability tests here after presented have been derived by computing the worst-case response time of a task under the above described notion of critical instant. In real-time computing scenarios, we are concerned with logical as well as temporal accuracy of the results. While developing algorithms or performing schedulability analysis, preemption overheads are usually ignored even, though it’s an operation that consumes finite amount of time. Preemption allows higher priority tasks to halt the lower priority tasks, though this need not be necessarily required to meet task deadlines. Our concern is not to get the results as soon as possible but soon enough to just meet the deadlines of all the tasks.

Preemption Threshold Scheduling (PTS) is an algorithm that tries to minimize preemptions by assigning two sets of priorities to each task. The nominal priority defines whether a task can preempt another task or not and the preemption-threshold is the effective priority with which a task runs during execution. When a task begins execution its priority is raised to preemption-threshold. Hence, only tasks with priority more than the preemption-threshold can preempt the running task. To assign the preemption-threshold, we initially assign it equal to the nominal priority. Starting with the task that has the least preemption-threshold we begin raising the priority till the point where the system is no more schedulable. Preemption threshold can be considered as a trade-off between fully preemptive and fully non-preemptive scheduling. Indeed, if each threshold priority is set equal to the task nominal priority, the scheduler behaves like a fully preemptive scheduler; whereas, if all thresholds are set to the maximum priority, the scheduler runs in a non-preemptive fashion. Wang and Saksena also showed that, by appropriately setting the thresholds, the system can improve the schedulability compared with fully preemptive and fully non-preemptive scheduling.

(8)

non-Available Online at www.ijpret.com 138

preemptive mode, but it can be schedulable by all limited preemptive approaches while guaranteeing their respective deadlines. Depending upon these existing real-time scheduling algorithms, we will try to design our new algorithms for preemptive threshold using Earliest Deadline First for CPU scheduling while considering above concepts. Then their performance will be evaluated. The flow of proposed system will be as follows.

Figure - flow of proposed system

PROPOSED SYSTEM DESIGN

Figure - Execution of task set using preemption threshold scheduling

Preemption Threshold Scheduling (PTS)

(9)

Available Online at www.ijpret.com 139

According to this model, proposed by each task is assigned a nominal priority Pi (used to enqueue the task into the ready queue and to preempt) and a preemption threshold Өi >= Pi (used for task execution). Then Ti can be preempted by Th only if Ph >Өi. at the activation time the priority of Ti is set to its nominal value Pi so it can preempt all the tasks Tj with threshold Өj<Pi .The nominal priority is maintained as long as the task is kept in the ready queue. During this interval, Ti can be delayed by all tasks Th with priority Ph>Pi and by at most one lower priority task Tl with threshold Өl >= Pi. When all such tasks complete Ti is dispatched for execution and its priority is raised at its threshold level Өi until the task terminates (at time fi,k). During this interval, Ti can be preempted by all tasks Th with priority Ph>Өi.

Developing the proposed scheduling model using preemption threshold, showing how it improves over pure preemptive and non-preemptive scheduling, and systematically allocating feasible scheduling attributes (priority and preemption threshold) to task sets. The beginning with developing the response-time analysis for the new model based on well know technique using critical instants and busy periods. Then develop an algorithm for assignment of task priorities and preemption thresholds. The solution comes in two steps. First, given an assignment of priorities, we develop an efficient algorithm that computes an optimal set of preemption thresholds. The algorithm is optimal in the usual sense of finding a feasible assignment, i.e., one that makes the task set schedulable, if one exists. Using this algorithm as a “sub-routine” we then propose an optimal search algorithm to find an optimal assignment of both priorities and preemption thresholds.

The pseudo code of the preemption threshold assignment algorithm is as-

Preemption threshold assignment algorithm:

Algorithm: Assign Thresholds

// Assume that task priorities are already known

(1) for( i :=1 to n)

(2) Yi = ; // start from lowest value

// find worst case response time based on the tentative assignment.

(3) Ri=WCRT(Ti,Yi);

(10)

Available Online at www.ijpret.com 140

(5) Yi++; //increase preemption threshold

(6) if Yi > n then

(7) Return FAIL; // system not schedulable

(8) end if

(9) Ri=WCRT(Ti,Yi);

(10) end

(11) end

(12) return SUCCESS;

An algorithm that finds an optimal preemption threshold assignment assuming that the priorities are known and fixed. The algorithm is optimal in the sense that if there exists a feasible preemption threshold assignment then the algorithm will also find a feasible assignment. The algorithm assumes that the tasks are numbered 1, 2,……n and that πi = i. The algorithm considers the preemption threshold assignment of one task at a time starting from the lowest priority task. For each task considered, it finds the lowest preemption threshold assignment that will make the task schedulable. This is done by computing the response time of the task using the function WCRT (task, threshold), and comparing it with its deadline. Note that, the response time calculation is possible even with a partial assignment since we consider tasks from low priority to high priority.

FEASIBILITY STUDY

The feasibility analysis under preemption thresholds can also be simplified under the conditions of Theorem as-

The worst-case response time of a non-preemptive task occurs in the first job after its critical instant if the following two conditions are both satisfied:

1) The task set is feasible under preemptive scheduling

2) The relative deadlines are less than or equal to periods

(11)

Available Online at www.ijpret.com 141

computation time among the tasks with priority lower than Pi and threshold higher than or equal to Pi. That is,

where the maximum of an empty set is assumed to be zero. then, the response time Ri of task ti is computed by considering the blocking time Bi, the interference before its start time (due to the tasks with priority higher than Pi), and the interference after its start time (due to tasks with priority higher than ti). The analysis must be carried out within the longest Level-i active period Li. Once the response time of each task is computed, the task set is feasible if and only if Condition is satisfied,

for i = 1, . . . , n, Ri<=Di.

CONCLUSION

A generalized fixed-priority scheduling model with the notion of preemption threshold bridges the gap between preemptive and non-preemptive scheduling and includes both of them as special cases. It captures the best of both models, and as a result it can feasibly schedule task sets which are not feasible with either pure preemptive scheduling, or non-preemptive scheduling. The simulation results over randomly generated task sets showing our model achieves substantial improvement of the schedulable utilization of task sets over both preemptive and non-preemptive cases. Furthermore, using the concept of level-i busy period, the derived equation for computing the worst-case response time of periodic or sporadic tasks in this general model. Using this analysis, the problem of finding an optimal priority ordering and preemption threshold assignment that ensures schedulability. One interesting aspect of the new scheduling model is that it achieves better schedulability without increasing the overheads. Not only does this new scheduling model not add any additional overheads, it can reduce overheads by incorporating the best aspects of non-preemptive scheduling into the preemptive scheduling model. Thus, the model can be used to introduce only enough preemptability as is necessary to achieve feasibility.

REFERENCES

(12)

Available Online at www.ijpret.com 142

2. M. Bertogna and S. Baruah, “Limited preemption EDF scheduling of sporadic task systems,” IEEE Transactions on Industrial Informatics,vol. 6, no. 4, pp. 579–591, 2010.

3. R. J. Bril, J. J. Lukkien, and W. F. J. Verhaegh, “Worst-case response time analysis of real-time tasks under fixed-priority scheduling with deferred preemption revisited” in Proc. of the 19th Euromicro Conf. on Real-Time Systems (ECRTS’07), Pisa, Italy, July 4-6, 2007, pp. 269–279.

4. Giorgio C. Buttazzo, Marko Bertogna and Gang Yao,“Limited Preemptive Scheduling for Real-Time Systems - A Survey”,IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, VOL. 9, NO. 1, FEBRUARY 2013.

5. Bipasa Chattopadhyay and Sanjoy Baruah,“Limited preemption Scheduling on

Multiprocessors”, Department of Computer Science The University of North Carolina at Chapel Hill, RTNS 2014 , October 8 - 10 2014, Versailles, France, Copyright 2014 ACM 978-1-4503-2727-5/14/10.

6. R. Ghattas and A.G. Dean, “Preemption threshold scheduling: Stack optimality,

enhancements and analysis”, In RTAS ’07: Proc. of the 13th IEEE Real Time and Embedded Technology and Applications Symposium, 2007.

7. C. Liu and J. Layland “Scheduling algorithms for multiprogramming in a hard-real-time environment,” Journal of the Association for computing Machinery, vol. 20, no. 1, pp. 46–61, January 1973.

8. Manas Saksena and Yun Wang, “Scalable Real-Time System Design using Preemption Thresholds” presented in part at RTCSA’99, conference proceedings of RTCSA’99 by the IEEE Computer Society Press.

9. Y. Wang and M. Saksena, “Scheduling fixed-priority tasks with preemption threshold,” in Proc. of the 6th IEEE Int. Conference on Real-Time Computing Systems and Applications (RTCSA’99), Hong Kong, China, December 13-15, 1999.

10.G. Yao, G. Buttazzo, and M. Bertogna, “Feasibility analysis under fixed priority scheduling with fixed preemption points,” in Proc. of the 16th IEEE Int. Conf. on Embedded and Real-Time Computing Systems and Applications (RTCSA 2010), Macau, China, August 23-25, 2010.

Figure

Figure - Execution of task set using preemption threshold scheduling

References

Related documents

In this paper, it is shown that addition of a watermark or message leaves unique artifacts, which can be detected using Image Quality Measures (IQM).This paper show that the image

Aim: To investigate potential of polymer Soluplus (SP), to form micellar/mixed micellar systems and its ability to improve solubility and consequently therapeutic efficacy of

Although the first target was batch control, the design of the models is universal, so that they can be used for continuous and discrete processes as well.. A clear terminology

However, if you take a piece of licorice and apply torsion to it, the licorice will twist around several times before it breaks.. Each of these materials has a different way

The multi-network with dynamic selection technique allows a combination of online and offline neural network models to be used in the architecture where the most suitable outputs

Abstract: The Schmidt hammer method was successfully used in determining early stages of weathering of gla- cially-abraded Jurassic limestone surfaces within the post-LIA forefield

The information obtained was used to develop a performance measurement framework for the bulk export segment in order to benchmark SA’s wine cellars supply chain processes.. The

21- Thus saith the LORD, The labour of Egypt, and merchandise of Ethiopia and of the Sabeans, men of stature, shall come over unto thee, and they shall be thine: