Chinaunix首页 | 论坛 | 博客
  • 博客访问: 66093
  • 博文数量: 28
  • 博客积分: 230
  • 博客等级: 二等列兵
  • 技术积分: 260
  • 用 户 组: 普通用户
  • 注册时间: 2009-12-01 09:44
文章分类

全部博文(28)

文章存档

2016年(1)

2015年(2)

2014年(11)

2013年(7)

2012年(7)

我的朋友

分类: LINUX

2014-04-29 14:14:20


参考如下网站 :



http://blog.csdn.net/21cnbao/article/details/8038279



http://www.ibm.com/developerworks/cn/linux/l-real-time-linux/

http://www.ibm.com/developerworks/cn/linux/l-lrt/part2/

https://www.linux.com/news/featured-blogs/200-libby-clark/710319-intro-to-real-time-linux-for-embedded-developers

heard from Steve Sakoman that embedded Linux doesn’t work when the device has hard real-time requirements (and in some cases, any real-time requirements). How does the real-time patch meet those requirements when embedded Linux falls short?

Honestly, I hate the terms "Hard real-time" and "Soft real-time.” How hard is hard?  I used to work for Lockheed Martin, and there we did have the classic "hard real-time". Basically that's for a small component, which is part of a bigger component, but you can test every branch that the software on that component can take. It ends up being a custom piece of software, even when you start out with something like VxWorks. Probably the best real-time OS was DOS, because you can customize it to whatever requirements you need.

But once the software needs to handle a more general situation, it grows out of being mathematically provable. Then you start to lose that classic "Hard" real-time everyone talks about. There's a lot of systems out there that call themselves "Hard" real-time, where they probably would not meet these requirements.

For those that need hard real-time, it’s usually to control something that will end up killing people if something goes wrong. Everything else pretty much does not need that classic "Hard" real-time OS.

That said, PREEMPT_RT gives you something that's very close. I will be the first to tell you that I wouldn't want the PREEMPT_RT kernel to be controlling whether or not the plane I'm flying on crashes. But it's good enough for robotics, stock exchanges, and for computers that have to interface with the "Hard" real-time software. PREEMPT_RT has been used on computers that have gone into space.

PREEMPT_RT is a "hardening" of Linux. It's far from mathematically provable, but if there's an unbounded latency that's in PREEMPT_RT, we consider that a bug, and work hard to fix it. Our goal is to make Linux as hard as possible. ;-) That's probably what they meant about Linux not being able to handle real-time, as the mainline Linux kernel is filled with unbounded latencies. With unbounded latencies comes non-deterministic behavior.

Mainline Linux can do things really fast most of the time, but every so often, you get that outlier that could cause a large delay. Ever see your mouse jitter? With a properly setup PREEMPT_RT kernel, your desktop experience can be made much smoother.

I said before that a lot of people want real-time when they don't really need it, and even fewer people need hard real-time when they think they need it. I gave a talk in Brazil once titled "Who needs Real Time Linux? (Not you!)", where I basically stated that it’s really a small niche of people that need real-time.

One place that PREEMPT_RT comes in handy is with musicians. They were our earliest testers. I asked one person who reported a bug to test a patch, and he asked me for some advice in applying it. I asked him if he was a computer programmer, and he replied, "No, I'm a guitarist". He told me that the RT patch was great for getting reliable recordings, as jitter from mainline Linux would cause a scratching sound. I thought it was really cool that non computer focused people had a use for our work.


test:



阅读(675) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~