views:

125

answers:

4

I have few queries related with going in for an RTOS for the different processors in hand. These are generic questions. Maybe you can clarify with examples specific to any processor/rtos or even generally. How to determine if a processor can support a RTOS ? How to know if the processor requires a RTOS ?

A: 
  • No processor REQUIRES an RTOS. RT is a feature of the programming, not something a processor can DEMAND.

  • EVERY processor that I know of supports RTOS - a hardware interrupt will interrupt at next instruction. It is basically the OS that stops that and handles things in a non-real-time fashion.

TomTom
One processor I know doesn't support a preemptive RTOS--the PIC16 family, because the call stack can't be manipulated.
Craig McQueen
There are a huge number of processors that just do not have enough memory to support an RTOS. Trying to configure one to run on a processor with 64 or 128 bytes of RAM just isn't worth the effort.
Ian
Wrong. Seriously. Not to say bullshit - some years ago 64mb was the memory of a workstation and guess what - there still were RTOS out there. A RTOS is sometimes needed to control very small but time critical applications, like ABS / ESP in cars. I sort of bet I dont need 16mb RAM for an ABS controller. RTOS are used a lot in embedded devices.
TomTom
@TomTom - Read what I wrote. I said BYTES not KBytes or MBytes. I am not saying that lots of embedded devices do not have an embedded RTOS. I AM saying that there are many that do not and a number that cannot.
Ian
@Craig McQueen : Interesting information.
S.Man
+2  A: 

This is another "how long is a piece of string" question, but I will give it +1 for being interesting.

Second point first. I don't think that a processor can require an RTOS; I would rather say that an application can.

As to whether a processor can support an RTOS, your principle questions are going to be how heavily you load it, how many events it must handle & how much processing they require, etc, and also the availability of interrupt handling mechanisms, etc.

Do you have a particular processor, ROTS, application in mind, or is this just a general question?

LeonixSolutions
+3  A: 

Does a processor requires an RTOS? No - you don't require an RTOS. You can have a sophisticated embedded application running without one. The applications that I am working on currently does not have an RTOS. We have to think about scheduling various tasks in our application, and have to write code that schedules these tasks. We achieve most of it by simply using software timers and timeslicing different tasks as we deem appopriate. However, having an RTOS can make the process a lot easier by scheduling different parts of your code seamlessly, and you don't really have to worry about taking care of that then.

You have to consider a few things when you choose an RTOS. How much RAM does your processor have? How much FLASH do you have? You don't want to put an expensive chip on your board, and a heavy RTOS, if you don't need all the features of it. For basic scheduling stuff, you can get relatively small RTOS's, that are not huge and that will do most things you want quite efficiently.
e.g. Free RTOS is open source and is roughly 9K's only

You can also choose to use RTOS' like VxWorks or Embedded Linux that do a whole lot more, but are either expensive or huge or both.

In the end, the RTOS you use really depends on what your application's needs are, and how much memory you have to spare for it.

IntelliChick
A: 

Why would a processor require and RTOS? After all an RTOS is just software running directly on the hardware, that software could equally be your application running directly on the hardware instead. That part of your question makes little sense. Now if you have a processor designed to run say Java code by executing bytecode in hardware, it would not make sense to use that processor with anything other than a JVM as the foundation for an application, but I cannot think of a processor that is so tailored to RTOS implementation that you could not use it without an RTOS.

Now with respect to whether a processor can support an RTOS the simplest way is to see if there is a commercial RTOS already implemented for it. Most processor vendors will ensure that such support is in place from one or more third-parties before a chip is generally available. Generally I would suggest that anything with an interrupt mechanism and timer hardware can support an RTOS or at least a scheduler of some sort given sufficient resources. However there are some very resource constrained microcontrollers where it would simply make no sense.

Clifford