Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Linux Gains Native RTOS Emulation Layer

Posted by ScuttleMonkey on Saturday March 22, @07:32AM
from the still-waiting-on-the-developer's-flyback-time dept.
nerdyH writes to tell us that the Xenomai/SOLO project is attempting to deliver VxWorks and other RTOS emulation for any Linux kernel. "Some weeks ago, I started laying the groundwork for porting the Xenomai emulators natively over the PREEMPT_RT kernel. Unlike the co-kernel based Xenomai version, SOLO does not require any kernel support from additional modules or patches. It is fully based on the standard POSIX library, and runs as a regular process controlled by a single image Linux kernel. As a first step, a VxWorks emulator has just been rebuilt over this new framework."

Related Stories

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.

Linux Gains Native RTOS Emulation Layer 25 Comments More | Login | Reply /

 Full
 Abbreviated
 Hidden
More | Login | Reply
Keybindings Beta
Q W E
A S D
Loading ... Please wait.
  • by Epistax (544591) <epistax AT gmail DOT com> on Saturday March 22, @07:54AM (#22828390) Journal
    The benchmarks that are really expected by real time in my area are things like consistency. For example if we set a task/thread to execute every 125 milliseconds, the closer it hits the mark the better. Time lag in either direction puts that OS in the "No" category. Another important asset of an RTOS is well defined task preemption: No task gets preempted by one with worse priority. Time slicing might be enabled so that a task gets preempted by one of the same priority, and better priority tasks always preempt if they are ready to go. Also if a high priority task is waiting on a resource owned by a low priority task, that low priority task gets an elevated priority equal to the high priority task. As a last ditch effort to provide mutual exclusion / data protection, threads/tasks need to be able to disable system interrupts. Remember kids, in the RTOS world one task can take down the whole system.

    VxWorks is the only OS I've played with so far that allows this, but I'm VERY curious to see what people can inject into the Linux kernel. VxWorks is.. shall we say... NOT CHEAP. And inter-version migration is a pain... and god help you if you aren't using off the shelf hardware...
    • by JohnFluxx (413620) on Saturday March 22, @08:02AM (#22828416)
      > Another important asset of an RTOS is well defined task preemption: No task gets preempted by one with worse priority. Time slicing might be enabled so that a task gets preempted by one of the same priority, and better priority tasks always preempt if they are ready to go.

      Any normal distro Linux kernel can do this particular part. Just set the scheduler to round robin. (You can do this in KDE4 btw. Press ctrl-esc to bring up the task manager, right click a process, change priority, and chose round robin.)
    • by pla (258480) on Saturday March 22, @09:00AM (#22828664) Journal
      VxWorks is.. shall we say... NOT CHEAP.

      Have you ever actually had to code for Vx?

      You couldn't pay me enough (literally - I've turned down jobs that wanted me to work with it... I should probably take it off my resume) to deal with that POS (by which I don't mean "Point Of Sale") on a regular basis.

      Actually, in fairness, as an OS, it doesn't suck too much. But the build tools... Let's just say WindRiver clearly subscribes to the "firmware should hurt" coding paradigm. The IDE made OutLook look stable and friendly, the command line build tools simply didn't work (literally - WR couldn't even have tested them, because they failed phenomenally even on a clean install and a "hello world" module), the revision control had no objection to overwriting parent revisions without forcing a new fork... Ugh. I'll probably have nightmares tonight just from thinking about it.

      Oddly enough, it surprises me to see it still talked about. When I suffered with it nearly a decade ago, it looked like a near-certainty that Linux would tap that last nail in its coffin. How ironic, that Linux should now give it new life via emulation.
      • by Epistax (544591) <epistax AT gmail DOT com> on Saturday March 22, @09:17AM (#22828724) Journal
        Oh yes I've coded for it. I'm on my second BSP and my third kernel. It's not as bad as it used to be in some respects. The Eclipse is the IDE now. The documentation is still horrendous though. WindRiver is working hard on their own RTOS Linux solution. I don't know if they are planning on eventually digging a hole and throwing VxWorks in it, or just trying to combat the free RTOS Linux market with something they can sell to managers.
        • Re: (Score:3, Informative)

          I have asked Wind River representatives whether their Linux product is meant to replace VxWorks and they emphatically said no. (If that means anything.)
      • Re: (Score:2)

        You couldn't pay me enough (literally - I've turned down jobs that wanted me to work with it... I should probably take it off my resume) to deal with that POS (by which I don't mean "Point Of Sale") on a regular basis.

        Really? I guess vxWorks is an acquired
        • Re:POS needs realtime? hahahahhaha (Score:5, Insightful)

          by richpm (950690) on Saturday March 22, @10:30AM (#22829086)
          "Why not just get a faster computer," Power consumption? Heat? Noise levels? Size? "... because if they had a clue, they would leverage Eclipse ..." I guess they've got a clue then, they've been shipping an Eclipse based IDE for 2+ years now and Wind River are /very/ active in the development of CDT. In fact the CDT project lead works for them now. Admittedly they do some stuff in a slightly non-standard way (e.g. not the way vanilla CDT does it) but that's with good reason and allows them a far more flexible build system than the standard CDT project model allows.
        • Re:POS needs realtime? hahahahhaha (Score:5, Informative)

          by billcopc (196330) <vrillco@yahoo.com> on Saturday March 22, @11:03AM (#22829240) Homepage
          I don't think you should be speaking against RTOS without any actual RTOS experience. It just makes everyone else assume you're an ass.

          These things typically run on embedded devices, not a friggin' Dell midtower. They do one job and they do it with exacting accuracy, on minified motherboards and fanless CPUs, hooked up to custom-built controllers and monitoring equipment.

          RTOS tasks are typically things we used to do in solid state with simple feedback logic, but the RTOS allows it to be done in software at a lower cost, plus allowing easy updates or adjustments without a complete redesign.
    • by Not Invented Here (30411) on Saturday March 22, @09:06AM (#22828682)
      The problem with VxWorks is that the scheduling accuracy is its only positive feature. Device drivers are rare and expensive, probably because it doesn't have a sensible hardware abstraction layer like Linux, Windows (NT family), and QNX. If you want to use the MMU on the processor you get charged again, and you get even more incompatibilities. The documentation doesn't go into much depth, and Google isn't very helpful, as hardly anybody talks about it on the Internet.

      Have you tried QNX or RTEMS? I don't have any data on their scheduling accuracy, but they claim to support the same real-time features. I've also found the QNX documentation much easier to follow, and I managed to turn out a BSP and a custom device driver within a week of first receiving the software.
      • Re: (Score:3, Insightful)

        I haven't had any experience with other systems yet really. VxWorks did add an abstraction layer for hardware drivers called "VxBus". So far the only advantage I've found is that.. Okay well I haven't found one but I did eventually get it to work. The a
    • Re: (Score:3, Insightful)

      VxWorks is the only OS I've played with so far that allows this (...)


      May be you need to play more :-) . LynxOS [wikipedia.org] is a full-fledged POSIX RTOS, with memory protection, far better than VxWorks if disk and network is involved (I was developing toll systems real time applications for 4 years). I hope someday Linux reach RTOS
      • by joelsherrill (132624) on Saturday March 22, @09:58AM (#22828912)
        RTEMS [http] is a free, open source alternative to VxWorks that provides POSIX threads in addition to an API we call the "Classic API" that was based upon an old dead proposed VITA standard from pSOS+ folks. RTEMS is single process, multi-threaded in the POSIX sense and has almost every POSIX 1003.1b features that is possible without being able to exec a new process. We use GNU tools and maintain an APT/Yum repository so GNU/Linux users have an easy situation with the tools. Check out some of the places it has been used at http://www.rtems.org/flyers.html [rtems.org] and in the Wiki Applications page [rtems.org]. You can get predictable tasking and algorithmic behavior while still staying in the free software world.
    • Re: (Score:3, Interesting)

      VxWorks is the only OS I've played with so far that allows this

      and god help you if you aren't using off the shelf hardware
      Well, and what does happen if you do use off-the-shelf hardware? I am not exactly "well educated" in this area, but I am not quite s
      • by Epistax (544591) <epistax AT gmail DOT com> on Saturday March 22, @09:34AM (#22828812) Journal
        Well, you can change to see if there is processor time being stolen from the OS by toggling a pin on a fast cycle and watching it with an oscilloscope, or perhaps polling the internal pentium timer. Someone before me had checked with our specific setup to see if this was happening (specifically we were concerned if USB hookups caused the BIOS to inject work) but nothing was detected. We use custom PC boards that could have had it disabled at the BIOS level, but I'm just not sure,

        Off-the-shelf is where BSP's and drivers come in. The BSP (board support package) needs to be configured for the specific board. WindRiver provides a kajillion default packages, and if you use a off-the-shelf-board, the BSP and driver set should require little or no modification at all so you can just go straight to customizing your OS. The more customized your board is, the more you might have to do, such as writing VME, clock, PCI, or Ethernet drivers, do custom memory management, etc. I guess it's not fair to peg this complication on WindRiver. I haven't tried a Linux kernel on a custom board, but just as much configuring must go on at some point.
    • Re: (Score:3, Informative)

      Linux with PREEMPT_RT is as predictable (but not as fast) as VxWorks in the mentioned categories, you just have to make sure that all the RT tasks have SCHED_FIFO or SCHED_RR to behave correctly. VxWorks doesn't have (or at least didn't in version 5.4-5.5
    • Re: (Score:2, Informative)

      by Anonymous Coward
      don't click that link, mod parent down.
    • Re:A quick search reveals (Score:5, Informative)

      by Tony Hoyle (11698) <tmh@nodomain.org> on Saturday March 22, @08:06AM (#22828426) Homepage
      FFS don't click that link - it's some sort of browser spawner/malware/virus.

      I had to power cycle my machine to shut it down as it managed to completely saturate the machine.
      As far as I can tell it:

      1. Tried to log me onto a gay porn site
      2. Tried to open up IRC and do something (failed, luckily, since osx won't let such things happen automatically.. my screen just filled boxes asking if I wanted to start colloquy)
      3. Tried to run a .exe - luckily on my mac that did nothing.. that's the virus payload I guess

      I reckon if you clicked that button on a windows machine you'd be crying right now - and your passwords would be all over IRC too...

      • Re: (Score:2)

        I clicked on it (I'm using firefox3 nightly on WinXP and was curious :-) ). It did start to do some crazy stuff on the system. I unplugged it. So far on reboot everything appears fine.
        • Re: (Score:3, Informative)

          No, it's Lord Haw Haw's Yahoo link that's attacking windows machines.
          But then, who in is right mind would admit on /. to running such a thing :)
          • But then, who in is right mind would admit on /. to running such a thing :)

            Just use the classic defence "I was reading /. from work" ;)
            • Re: (Score:3, Insightful)

              Hehe, I see it the other way around.
              I don't like having to fend off thousands of malwares with an OS that implemented networking as an afterthought.
        • Re: (Score:2, Informative)

          by Anonymous Coward
          What's worse, the link (that Slashdot shows as a Yahoo link) is actually an only slightly obfuscated Nimp link.

          Aside, I find it amazing that a 4 letter TLD is allowed to be used this way as long as it has. Nimp isn't just a shock site, it's got to break en
        • Re: (Score:2)

          You can disable certain Javascript functions in Firefox, such as the ability to move or resize windows. Options>Content>Javascript Advanced