Abstract
In this article, we propose two techniques that aim to minimize the scheduling latency of high-priority interrupt-driven tasks, named the Interrupt Handler Migration (IHM) and Direct Interrupt Scheduling (DIS). The IHM allows the interrupt handler to be migrated from the interrupt handler thread to the corresponding target process so that additional context switch can be avoided and the cache hit ratio with respect to the data generated by the interrupt handler can be improved. In addition, the DIS allows the shortest path reserved for urgent interrupt-process pairs to be laid between the interrupt arrival and target process by dividing a series of interrupt-driven operations into nondeferrable and deferrable operations. Both the IHM and DIS can be combined in a natural way and can operate concurrently. These techniques can be applied to all kinds of interrupt handlers with no modification to them. The proposed techniques not only reduce the scheduling latency, but also resolve the interrupt-driven priority inversion problem.
We implemented a prototype in the Linux 2.6.19 kernel after adding real-time patches. Experimental results show that the scheduling latency is significantly reduced by up to 84.2% when both techniques are applied together. When the Linux OS runs on an ARM-based embedded CPU running at 200MHz, the scheduling latency can become as low as 30μs, which is much closer to the hardware-specific limitations. By lowering the scheduling latency, the limited CPU cycles can be consumed more for user-level processes and less for system-level tasks, such as interrupt handling and scheduling.
- Abeni, L., Goel, A., Krasic, C., Snow, J., and Walpole, J. 2002. A measurement-based analysis of the real-time performance of linux. In Proceedings of the 8th Real-Time and Embedded Technology and Applications Symposium. IEEE, Los Alamitos, CA. Google Scholar
Digital Library
- Aron, M. and Druschel, P. 2000. Soft timers: Efficient microsecond software timer support for network processing. ACM Trans. Comput. Syst. 18, 3, 197--228. Google Scholar
Digital Library
- Batcher, K. W. and Walker, R. A. 2006. Interrupt triggered software prefetching for embedded cpu instruction cache. In Proceedings of the 12th Real-Time and Embedded Technology and Applications Symposium. IEEE, Los Alamitos, CA. Google Scholar
Digital Library
- Bovet, D. and Cesati, M. 2003. Understanding Linux Kernel, 3rd ed. O'REILLY, Sebastopol, CA. Google Scholar
Digital Library
- Dietrich, S. and Walker, D. 2005. The evolution of real-time linux. In Proceedings of the 7th Real-Time Linux Workshop.Google Scholar
- Dovrolis, C., Thayer, B., and Ramanathan, P. 2001. Hip: Hybrid interrupt-polling for the network interface. ACM Operating Syst. Rev. Google Scholar
Digital Library
- Druschel, P. and Banga, G. 1996. Lazy receiver processing: A network subsystem architecture for server systems. In Proceedings of the 2th Symposium on Operating Systems Design and Implementation. USENIX, Berkeley, CA. Google Scholar
Digital Library
- Goel, A., Abeni, L., Krasic, C., Snow, J., and Walpole, J. 2002. Supporting time-sensitive applications on a commodity os. In Proceedings of the 5th Symposium on Operating Systems Design and Implementation. USENIX, Berkeley, CA. Google Scholar
Digital Library
- Jones, M. 2006. Inside the linux scheduler. IBM developerWorks.Google Scholar
- Kirsch, C., Sanvido, M., and Henzinger, T. 2005. A programmable microkernel for real-time systems. In Proceedings of the 1st International Conference on Virtual Execution Environments. ACM, New York, 35--45. Google Scholar
Digital Library
- Kleiman, S. and Eykholt, J. 1995. Interrupts as threads. ACM Operating Syst. Rev. Google Scholar
Digital Library
- Langendoen, K., Romein, J., Bhoedjang, R., and Bal, H. 1996. Integrating polling, interrupts, and thread management. In Proceedings of the 6th Symposium on the Frontiers of Massively Parallel Computation. IEEE, Los Alamitos, CA. Google Scholar
Digital Library
- Lee, J. and Park, K. 2005. Delayed locking technique for improving real-time performance of embedded Linux by prediction of timer interrupt. In Proceedings of the 11th Real-Time and Embedded Technology and Applications Symposium. IEEE, Los Alamitos, CA, 487--496. Google Scholar
Digital Library
- Lee, J. and Park, K. 2009. Prediction-based micro-scheduler: Toward responsive scheduling of general-purpose operating systems. IEEE Trans. Comput. 58, 5, 648--661. Google Scholar
Digital Library
- Leslie, I., McAuley, D., Black, R., Roscoe, T., Barham, P., Evers, D., Fairbairns, R., and Hyden, E. 1996. The design and implementation of an operating system to support distributed multimedia applications. IEEE J. Selected Areas Commun. 14, 7, 1280--1297. Google Scholar
Digital Library
- Love, R. 2002. Lowering latency in Linux: Introducing a preemptible kernel. Linux J. 20, 97. Google Scholar
Digital Library
- Mogul, J. and Ramakrishnan, K. K. 1997. Eliminating receive livelock in an interrupt-driven kernel. ACM Trans. Comput. Syst. 15, 3, 217--252. Google Scholar
Digital Library
- Molnar, I. Real-time preempt patch. http://people.redhat.com/mingo/realtime-preempt/.Google Scholar
- Prasad, R. S., Jai, M., and Dovrolis, C. 2004. Effects of interrupt coalescence on network measurements. In Proceedings of the 5th Passive and Active Measurements Workshop. Springer, Berlin, 247--256.Google Scholar
- Puaut, I. and Decotigny, D. 2002. Low-complexity algorithms for static cache locking in multitasking hard real-time systems. In Proceedings of the 23rd Real-Time Systems Symposium. IEEE, Los Alamitos, CA. Google Scholar
Digital Library
- Sundaram, V., Chandra, A., Goyal, P., Shenoy, P., Sahni, J., and Vin, H. 2000. Application performance in the linux multimedia operating system. In Proceedings of the 8th Conference on Multi-Media. ACM, New York. Google Scholar
Digital Library
- Zhang, Y. and West, R. 2006. Process-aware interrupt scheduling and accounting. In Proceedings of the 27th Real-Time Systems Symposium. IEEE, Los Alamitos, CA, 191--201. Google Scholar
Digital Library
Index Terms
Interrupt handler migration and direct interrupt scheduling for rapid scheduling of interrupt-driven tasks
Recommendations
Interrupt Handling for Out-of-Order Execution Processors
Processors with multiple functional units, including the superscalars, achieve significant performance enhancement through low-level execution concurrency. In such processors, multiple instructions are often issued and definitely executed concurrently ...
Delayed Interrupt Processing Technique for Reducing Latency of Timer Interrupt in Embedded Linux
CSE '09: Proceedings of the 2009 International Conference on Computational Science and Engineering - Volume 02In real-time operating systems, timer interrupts are usually used for indicating when a real-time task should be started. Critical sections with interrupts disabled can, however, cause an unacceptable delay in the execution of these tasks. Existing ...
Process-Aware Interrupt Scheduling and Accounting
RTSS '06: Proceedings of the 27th IEEE International Real-Time Systems SymposiumIn most operating systems, the handling of interrupts is typically performed within the address space of the kernel. Moreover, interrupt handlers are invoked asynchronously during the execution of arbitrary processes. Unfortunately, this allows for a ...






Comments