ISSN 0253-2778

CN 34-1054/N

Open AccessOpen Access JUSTC Original Paper

A real-time multi-task scheduling framework in Linux user space

Cite this:
https://doi.org/10.3969/j.issn.0253-2778.2017.08.002
  • Received Date: 11 September 2016
  • Rev Recd Date: 11 April 2017
  • Publish Date: 31 August 2017
  • Task scheduling in Linux kernel has tremendous overhead, and thus cannot fulfill the requirement of real-time applications. ULight, a real-time multi-task scheduling framework running in Linux user space was proposed to conquer this problem. ULight consists of three core modules: multi-task scheduling module, timer module and user-mode interrupt handling module. The multi-task scheduling module provides priority-based preemptive scheduling in Linux user space to reduce the overhead of task switch and scheduling; the timer module introduces a high-resolution timer system to support time-sharing scheduling, enable task sleep and increase preemption points; the user-mode interrupt handling module builds up an channel between kernel and user space, which enables user-mode threads to handle interrupts directly and efficiently in Linux user space. The experiment results show that, ULight brings much less overhead than Linux Pthread in terms of task scheduling; and keeps the precision of the timer stable within 20 μs; and can response to interrupts rapidly in user space.
    Task scheduling in Linux kernel has tremendous overhead, and thus cannot fulfill the requirement of real-time applications. ULight, a real-time multi-task scheduling framework running in Linux user space was proposed to conquer this problem. ULight consists of three core modules: multi-task scheduling module, timer module and user-mode interrupt handling module. The multi-task scheduling module provides priority-based preemptive scheduling in Linux user space to reduce the overhead of task switch and scheduling; the timer module introduces a high-resolution timer system to support time-sharing scheduling, enable task sleep and increase preemption points; the user-mode interrupt handling module builds up an channel between kernel and user space, which enables user-mode threads to handle interrupts directly and efficiently in Linux user space. The experiment results show that, ULight brings much less overhead than Linux Pthread in terms of task scheduling; and keeps the precision of the timer stable within 20 μs; and can response to interrupts rapidly in user space.
  • loading
  • [1]
    王鹏. Linux 内核实时性的研究与改进[D]. 南京:东南大学, 2009.
    [2]
    BEHNAM M, NOLTE T, SHIN I, et al. Towards hierarchical scheduling in VxWorks[C]// Proceedings of the 4th International Workshop on Operating Systems Platforms for Embedded Real-Time Applications. Prague, Czech: IEEE Press, 2008: 63-72.
    [3]
    KLEINES H, ZWOLL K. Real time UNIX in embedded control-a case study within the context of LynxOS[J]. IEEE Transactions on Nuclear Science, 1996, 43(1): 13-19.
    [4]
    MAUERER W. Professional Linux Kernel Architecture[M]. Birmingham, UK: Wrox Press, 2008.
    [5]
    BOVET D P, CESATI M. Understanding the Linux Kernel[M]. 3ed, Sebastopol, USA: O’REILLY, 2005.
    [6]
    OLIVEIRA D B, OLIVEIRA R S. Timing analysis of the PREEMPT RT Linux kernel[J]. Software: Practice and Experience, 2015, 46(6): 789-819.
    [7]
    KOH J H, CHOI B W. Real-time performance of real-time mechanisms for RTAI and Xenomai in various running conditions[J]. International Journal of Control and Automation, 2013, 6(1): 235-246.
    [8]
    吴志强, 黄章进, 顾乃杰, 等. 一种多核平台下的用级实时多任务库[J]. 小型微型计算机系统, 2015, 36(7): 1438-1443.
    WU Zhiqiang, HUANG Zhangjin, GU Naijie, et al.A user-level real-time task library on multicore[J]. Journal of Chinese Computer Systems, 2015, 36(7): 1438-1443.
    [9]
    BARABANOV M. A Linux-based real-time operating system[D]. Socorro, USA: New Mexico Institute of Mining and Technology, 1997.
    [10]
    MANTEGAZZA P, DOZIO E L, PAPACHARALAMBOUS S. RTAI: Real time application interface[J]. Linux Journal, 2000, 2000(72es): No.10.
    [11]
    ENGELSCHALL R S. Portable multithreading: The signal stack trick for user-space thread creation[C]// Proceedings of the annual conference on USENIX Annual Technical Conference. Berkeley, USA: USENIX Association, 2000: 20-20.
    [12]
    GRAMOLI V, GUERRAOUI R, TRIGONAKIS V. TM2C: a software transactional memory for many-cores[C]// Proceedings of the 7th ACM European Conference on Computer Systems. Bern, Switzerland: ACM Press, 2012: 351-364.
    [13]
    AHN H J, CHO M H, JUNG M J, et al. UbiFOS: A small real-time operating system for embedded systems[J]. ETRI Journal, 2007, 29(3): 259-269.
    [14]
    GLEIXNER T, NIEHAUS D. Hrtimers and beyond: Transforming the Linux time subsystems[C]// Proceedings of the Ottawa Linux Symposium. Ottawa, Canada: ACM Press, 2006: 333-346.
    [15]
    ZHANG X, GU N J, SU J J. DCUDP: Scalable data transfer for high-speed long-distance networks[J]. Concurrency and Computation: Practice and Experience 2017, 29(4): e3846(1-26).
  • 加载中

Catalog

    [1]
    王鹏. Linux 内核实时性的研究与改进[D]. 南京:东南大学, 2009.
    [2]
    BEHNAM M, NOLTE T, SHIN I, et al. Towards hierarchical scheduling in VxWorks[C]// Proceedings of the 4th International Workshop on Operating Systems Platforms for Embedded Real-Time Applications. Prague, Czech: IEEE Press, 2008: 63-72.
    [3]
    KLEINES H, ZWOLL K. Real time UNIX in embedded control-a case study within the context of LynxOS[J]. IEEE Transactions on Nuclear Science, 1996, 43(1): 13-19.
    [4]
    MAUERER W. Professional Linux Kernel Architecture[M]. Birmingham, UK: Wrox Press, 2008.
    [5]
    BOVET D P, CESATI M. Understanding the Linux Kernel[M]. 3ed, Sebastopol, USA: O’REILLY, 2005.
    [6]
    OLIVEIRA D B, OLIVEIRA R S. Timing analysis of the PREEMPT RT Linux kernel[J]. Software: Practice and Experience, 2015, 46(6): 789-819.
    [7]
    KOH J H, CHOI B W. Real-time performance of real-time mechanisms for RTAI and Xenomai in various running conditions[J]. International Journal of Control and Automation, 2013, 6(1): 235-246.
    [8]
    吴志强, 黄章进, 顾乃杰, 等. 一种多核平台下的用级实时多任务库[J]. 小型微型计算机系统, 2015, 36(7): 1438-1443.
    WU Zhiqiang, HUANG Zhangjin, GU Naijie, et al.A user-level real-time task library on multicore[J]. Journal of Chinese Computer Systems, 2015, 36(7): 1438-1443.
    [9]
    BARABANOV M. A Linux-based real-time operating system[D]. Socorro, USA: New Mexico Institute of Mining and Technology, 1997.
    [10]
    MANTEGAZZA P, DOZIO E L, PAPACHARALAMBOUS S. RTAI: Real time application interface[J]. Linux Journal, 2000, 2000(72es): No.10.
    [11]
    ENGELSCHALL R S. Portable multithreading: The signal stack trick for user-space thread creation[C]// Proceedings of the annual conference on USENIX Annual Technical Conference. Berkeley, USA: USENIX Association, 2000: 20-20.
    [12]
    GRAMOLI V, GUERRAOUI R, TRIGONAKIS V. TM2C: a software transactional memory for many-cores[C]// Proceedings of the 7th ACM European Conference on Computer Systems. Bern, Switzerland: ACM Press, 2012: 351-364.
    [13]
    AHN H J, CHO M H, JUNG M J, et al. UbiFOS: A small real-time operating system for embedded systems[J]. ETRI Journal, 2007, 29(3): 259-269.
    [14]
    GLEIXNER T, NIEHAUS D. Hrtimers and beyond: Transforming the Linux time subsystems[C]// Proceedings of the Ottawa Linux Symposium. Ottawa, Canada: ACM Press, 2006: 333-346.
    [15]
    ZHANG X, GU N J, SU J J. DCUDP: Scalable data transfer for high-speed long-distance networks[J]. Concurrency and Computation: Practice and Experience 2017, 29(4): e3846(1-26).

    Article Metrics

    Article views (783) PDF downloads(319)
    Proportional views

    /

    DownLoad:  Full-Size Img  PowerPoint
    Return
    Return