Abstract
Task scheduling in embedded system needs the WCET (Worst-Case Execution Time) of the task to ensure that tasks can be completed before their deadline. The application of cache reduces the average case execution time of tasks but increases the difficulty of scheduling because WCET becomes difficult to determine. Cache locking is a technique to help determine the WCET of a task. In addition, applying suitable cache locking selection can reduce the WCET of a task, bring easier task scheduling and further reduce the total WCET of all tasks. In this paper, we propose an approach integrated dynamic cache locking and task scheduling in a single core embedded system. We choose the most valuable locking content for each task in limited cache capacity to determine the WCET, schedule the tasks so that all the tasks can be finished before the deadline and make the total WCET minimized. We have implemented this approach and compared it to no-cache task scheduling and non-preemption task scheduling model with LRU cache by using a set of tasks. The experimental results show that our approach achieves successfully task scheduling for all test data. Compared to no-cache task scheduling, our approach achieves the average improvements of 3.22%, 12.68%,18.96% and 19.12% for the 256B, 512B, 1KB and 2KB caches, respectively. Compared to the non-preemption task scheduling model, our approach achieves the average improvements of 1.32%, 7.27%, 10.2% and 9.13% for the 256B, 512B, 1KB and 2KB caches, respectively.
Content from this work may be used under the terms of the Creative Commons Attribution 3.0 licence. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.