Response Time Analysis of Gang Scheduling for Real Time Systems Fabrício A. B. Silva, Ernesto P.Lopes, Eliana P. L. Aude, Flavio Mendes, Júlio T.C. Silveira, Henrique Serdeira, Mario Martins and Walfredo Cirne1 Núcleo de Computação Eletrônica Universidade Federal do Rio de Janeiro {fasilva, elaude, fmendes, julio, serdeira, mmartins}@nce.ufrj.br,
[email protected],
[email protected]. Abstract This paper investigates the application of gang scheduling-based algorithms for real time systems that contain multiple processors. We derive the worst-case response time analysis for gang scheduling with and without machine sharing among jobs. The framework presented for calculating the worst-case response time is general, and can be used with any gang scheduling-based algorithm. We also propose and analyze an algorithm which has the following characteristic: if is not possible to generate a feasible schedule with the proposed algorithm, no other algorithm can generate a feasible schedule when all jobs are gang scheduled. All algorithms are analyzed using fixed, pre-defined priorities. We conclude that gang scheduling can be an effective policy for workloads where all jobs have real-time constraints.
1. Introduction In real time systems, a scheduling policy is responsible not only for ordering the use of systems resources. It should also be able to predict the worst-case behavior of the system when the scheduling algorithm is applied [BURNS01]. This paper deals with real time scheduling when multiple processors are available. In particular, we investigate in this paper the use of gang scheduling for real time systems. In gang scheduling, a set of tasks are grouped together into a gang and scheduled simultaneously in a set of processors. Gang scheduling has several advantages, among them: Good performance for synchronization/communication intensive jobs[FEITELSON92], a job has the impression of being executed in a dedicated machine[JETTE97,FEITELSON97] and efficient implementations are available for both SMP and distributed memory machines [HORI96,JETTE98]. For real time systems the abstraction provided by gang scheduling of a dedicated machine to each job is very useful for two reasons: First, it eases the estimation of worst case execution time through measurement, since the effects related with uncoordinated 1
Walfredo Cirne is affiliated with the Universidade Federal da Paraíba
scheduling do not have to be taken into account. Worst-case execution times derived from direct measurements can also be used in the response time analysis of the workload. This characteristic is especially useful for jobs whose tasks are communication/synchronization intensive. Second, it makes the response time analysis straightforward, being similar to the sequential analysis for simple cases. In [LEE98], Lee et al. proposed a gang scheduling based policy that can be effectively used to schedule a mixed workload composed of real-time and non-real-time jobs. This work addresses gang scheduling for real time in a more theoretical perspective, where all jobs have realtime constraints. The workload model that we will consider in our analysis has the following characteristics: • There are M jobs, and all of them are ready for execution at time 0 • The gang size, the number of processors needed for execution of a Job Ji is equal to Ti. That is, the gang size Ti is the number of tasks in job Ji which must be equal to the number of processors needed for execution of job Ji. • Jobs are periodic, with deadline equal to the period. Each job i has a worst-case execution time Ci associated with it which is known in advance, either through measurement or code analysis. The Job i is released each Di units of time, Di being equal to the period. The job must finish execution before the next release, which makes Ci