debian – 如何在Linux中运行实时应用程序?

试着在我的Debian Jessie上使用LinuxCNC,我做了:

>使用apt-get / aptitude通过Jessie backport安装内核4.9 RT.
>重新启动我的计算机并检查uname -a包含PREEMPT RT
>通过添加存储库并使用apt-get安装LinuxCNC

之后,启动linuxCNC向导(通过菜单中的正常点击)进行抖动测试.我目前的结果绝对不错,大约140us.

我想知道是否有任何PREEMPTION配置启用,或者运行应用程序以获得更精确的实时特定方式?

另外,我如何检查进程是否实时运行?

注意:我的电脑是intel E6600

最佳答案

I wonder if there is any PREEMPTION configuration to enable, or specific way to run an application to get more precise real-time?

请参阅以下内容:

http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Latency-Test

链接到这个:

https://forum.linuxcnc.org/18-computer/25927-reducing-latency-on-multicore-pc-s-success?limitstart=0

(来自上面的页面:)

Linux related changes:

  • edit /etc/default/grub and add the kernel options: “isolcpus=1 acpi_irq_nobalance noirqbalance” (call update-grub afterwards)
  • make sure that the software “irqbalance” is NOT installed, remove if it is there (Ubuntu software center -> installed software ->
    search for irqbalance -> remove)
  • add the upstart script “irq-affinity.conf” to /etc/init (see attachments, it will move the irq-handling to the first core)
  • add the sh scripts set-irq-affinity and watchirqs to /usr/local/sbin (first allows to set the affinity mask manually, second opens a console
    window that shows live how the irqs are scheduled to the different cores
    -> all numeric irqs but 0 should be handled by cpu0)

您可能需要调整SystèmeD的脚本,但……

快速测试:
你也可以使用nice -n< x>来提高优先级,其中< x>是理想的优先事项.

Also, how could I check that the process is running real-time?

看到这个问题:Real time processes scheduling in Linux

希望有所帮助;-)

转载注明原文:debian – 如何在Linux中运行实时应用程序? - 代码日志