Myopic Scheduler Analysis CprE 458, Fall 2008. Matt Wall and Matt Herbst Abstract This project analyzes the myopic scheduling algorithm for schedulability based on its window size, heuristic values, and allowed backtracks. A myopic scheduler and a task set generator were produced, then used to test the success ratio. Introduction The myopic scheduler is a multi-processor task scheduler that picks from a small subset of given tasks (the “task window”) and attempts to schedule based on resource constraints, ready time, and computation time. It also allows for a certain number of “backtracks,” which occur when the algorithm has hit the bottom of an unschedulable branch in the search tree. These values can all be changed, but it’s unclear how they will affect how many sets are schedulable. What quantities are necessary for acceptable performance, but not so large as to make the algorithm too slow? Scheduler The scheduler uses the Spring Myopic algorithm as specified in [1] and was implemented in C#. The scheduler takes a task set file, a feasibility check window (K), a number of backtracks (num-btrk), and an heuristic algorithm weight (W). The scheduler generates a myopic tree to determine if the task set is schedulable. If the task set is schedulable then it returns true, false otherwise. This was used to determine the success ratio of a large number of task sets, and compare the success ratios as different variables are modified. Task set generator The function of the task set generator is to produce a large number of schedulable task sets. A task set is a set of tasks with ready time, runtime, deadline, and resource constraints. A task set used for performance analysis needs to be theoretically schedulable or otherwise is useless for analysis. If a task set is theoretically schedulable, a schedule can be found if the window (K) and the number of backtracks (num-btrk) is set to infinite, and thus all scheduling trees are explored. Such a task set can be produced by generating a schedule, then stripping out the assigned start times and setting deadlines. The process for generating the schedule is similar to the one proposed in [2]. The task set generator program accepts the parameters MIN_C, MAX_C, Laxity (R), UseP, ShareP, num-proc, num-res, schedule length (time), and task set count (the number of task sets to produce at once). A program fills a schedule with tasks until the schedule length is reached. The computation time of each task is randomly generated between MIN_C and MAX_C. The deadline is generated randomly between SC and (1 + R) * SC where R is the laxity parameter and SC is the shortest completion time of the task. Whether a task uses a particular resource is determined by the UseP and ShareP parameters that specify the probably of exclusively using or sharing a resource. The output to this program is an XML file containing generated task sets that can be used for performance analysis. Performance analysis Three variables were analyzed to see how schedulability is affected in the myopic scheduler. The task sets remained the same. 1. Window size (K) 2. Heuristic algorithm (H) 3. Number of backtracks (num-btrk) A base value for each was selected, then each was independently changed to see how schedulability is affected. Schedulability was measured by the ratio of schedulable task sets to the total number attempted. This information demonstrates how important each is to balancing schedulability and performance. Performance is hurt when K or num-btrk are too high, since more computations are done. Though this will not be quantified in this analysis, it is important to note because it motivates a minimization of these parameters. References These resources will be used in building the scheduler and task set generator. [1] K. Ramamritham, J.A. Stankovic, and P.-F. Shiah, “Efficient scheduling algorithms for real-time multiprocessor systems,” IEEE Transactions on Parallel and Distributed Systems, vol. 1, no. 2, pp. 184-194, Apr. 1990. [2] C. Siva Ram Murthy and G. Manimaran, Resource Management in Real-Time Systems and Networks. Cambridge, MA: The MIT Press, 2001, pp. 41-49.