Linux下cyclictest的实时性测试
一、测试命令./cyclictest –p 80 –t5 –n
1. 默认创建5个SCHED_FIFO策略的realtime线程,优先级80,运行周期是1000,1500,2000,2500,3000微秒,无干扰测试结果图:
由此可见在AdvLinux3.0.2实时系统,最小值在2~3微秒,平均值为9-11微秒,而最大值则分布在24-29微秒之间。
2.运行同样的测试,但是在运行这个测试的过程中引入更多的干扰,如将该设备与其它设备进行串口通信,则结果变为有干扰测试结果图:
引入串口通信过程,最大值为34us。没有出现AdvLinux3.0.2非实时系统下,最大值为1219微秒。
二、测试命令./cyclictest--smp -p95 -m
三、测试命令./cyclictest -t1 -p 80 -n -i number -l10000
线程优先级为80,不同的时间间隔下的结果,其中,C:9397计数器。线程的时间间隔每达到一次,计数器加1
Min:最小时延(us);Act:最近一次的时延(us);Avg:平均时延(us);Max: 最大时延(us)
I为500us时,最小延时为2,平均为11,最大的为 26。I为10000us时,最小延时为4,平均为17,最大的为 33。
RT-Preempt Patch使能
RT-Preempt Patch对Linux kernel的主要改造包括:
- Making in-kernel locking-primitives (using spinlocks) preemptible though reimplementation with rtmutexes:
- Critical sections protected by i.e. spinlock_t and rwlock_t are now preemptible. The creation of non-preemptible sections (in kernel) is still possible with raw_spinlock_t (same APIs like spinlock_t)
- Implementing priority inheritance for in-kernel spinlocks and semaphores. For more information on priority inversion and priority inheritance please consultIntroduction to Priority Inversion
- Converting interrupt handlers into preemptible kernel threads: The RT-Preempt patch treats soft interrupt handlers in kernel thread context, which is represented by a task_struct like a common userspace process. However it is also possible to register an IRQ in kernel context.
- Converting the old Linux timer API into separate infrastructures for high resolution kernel timers plus one for timeouts, leading to userspace POSIX timers with high resolution.
1. What is "latency"? ------------------------------------------------------------------------------The term latency, when used in the context of the RT Kernel, is the time interval between the occurance of an event and the time when that event is "handled" (typically "handled" means running some thread as a result of the event). Latencys that are of interest to kernel programmers (and application programmers) are: - the time between when an interrupt occurs and the threadwaiting for that interrupt is run- the time between a timer expiration and the thread waiting forthat timer to run- The time between the receipt of a network packet and when thethread waiting for that packet runsYes, the timer and network example above are usually examples of the more general interrupt case (most timers signal expiration with an interrupt and most network interface cards signal packet arrival with an interrupt as well), but the main idea is that an "event" occurs and there is some elapsed time interval which concludes with the kernel successfully handling the event.So, latency in and of itself is not a bad thing; there is always a delay between occurance and completion of an event. What is bad is when latency becomes excessive, meaning that the delay exceeds some arbitrary threshold. What is this threshold? That's for each application to define. A threshold or "deadline" is what defines a real time application: meeting deadlines means success, missing deadlines (exceeding the threshold) means failing to be real time.
https://rt.wiki.kernel.org/index.php/Cyclictest
Linux下cyclictest的实时性测试相关推荐
- Linux下网络流量实时监控工具 大全
Linux下网络流量实时监控工具 大全 在工作中发现,经常因为业务的原因,需要即时了解某台服务器网卡的流量,虽然公司也部署了cacti软件,但cacti是五分钟统计的,没有即时性,并且 有时候打开监控 ...
- Linux下网络流量实时监控工具大全
Linux下网络流量实时监控工具 大全 在工作中发现,经常因为业务的原因,需要即时了解某台服务器网卡的流量,虽然公司也部署了cacti软件,但cacti是五分钟统计的,没有即时性,并且有时候打开监控页 ...
- linux监控覆盖视频恢复,linux下使用inotify实时监控文件变更,做完整性检查
linux下使用inotify实时监控文件变更,做完整性检查 完整性检查是HIDS的重要组成部分之一,linux下做完整性检查的思路有3个 1.哈希对比 2.签名校验 3.inotify 方法有2个: ...
- linux下几种文件系统的测试比较
在linux下对部分文件系统进行测试 一. 我的实验平台 我使用的是vmware workstation7.1.4.16648 虚拟机 安装的操作系统信息 [root@node2 ~]# uname ...
- Linux 下 4 种实时监控日志文件的方法,总有一种适合你
点击上方蓝色"程序猿DD",选择"设为星标" 回复"资源"获取独家整理的学习资料! 来源 | http://t.cn/AiKIk7c3 在 ...
- linux文件系统选哪种,linux下几种文件系统的测试比较
在linux下对部分文件系统进行测试 一. 我的实验平台 我使用的是vmware workstation7.1.4.16648虚拟机 安装的操作系统信息 [root@node2 ~]# uname - ...
- ubuntu20.04+x86_64+virtualbox6.7 环境下编译xenomai内核和实时性测试[详解]
下面是针对实时系统Xenomai使用的一些记录,实时系统在工业自动化,机器人等智能行业是必需会用到的. 简述 xenomai是众多inux实时性解决方案中的一种,通过在linux的基础上添加一个RTO ...
- twincat不使用倍福控制器情况下的实时性测试
twincat本质上由两部分组成,xar是一个runtime,可以理解为一个实时系统,xae是一个开发环境,两者可在同一计算机也可以在两个不同计算机. twincat并非依赖倍福控制器才能做实时控制, ...
- linux下使用inotify实时监控文件变更,做完整性检查
完整性检查是HIDS的重要组成部分之一,linux下做完整性检查的思路有3个 1.哈希对比 2.签名校验 3.inotify 方法有2个: A.定期检测,例如通过cron或程序内置计时器 B.实时检测 ...
最新文章
- plotly可视化绘制多子图(subplots)并自定义坐标轴
- 谷歌要用AI把你的自拍做成表情包
- 试题以文件的形式存在C语言,2016年计算机二级C语言上机题库
- 如何跟下属进行沟通?
- 和套套一样,一次性橡胶手套制作现场, 这鬼畜的画风
- 初中毕业学计算机在哪学,初中毕业要学计算机要去哪个里学呢
- 【高并发】JUC中的Executor框架详解2
- Python binascii
- hⅰgh怎么读音发音英语_gh的发音规律
- 老罗android开发视频教程全集百度网盘下载
- ThinkPad Tablet2升级Windows10(各种故障及解决方案)
- java excel 表头_Java如何生成excel的表头可变的示例代码
- google书签删除了怎么恢复?谷歌浏览器删除的书签怎么恢复?
- 常用网络测试命令——ping命令
- 源码方式安装nginx及其依赖并设置服务开机启动
- 复习整合Mysql指令操作
- c语言英文版孤独怎么说,孤独的伤感的英文句子
- 在ubuntu18.04上安装vmware
- Android车机初体验
- java 硬币_java实现硬币方案