2
\$\begingroup\$

Given a device that incorporates an embedded processor (MIPS), MMU, small RAM and larger flash memory, is there an RTOS with small memory footprint that has a built in support for "virtual memory", where some RAM can be used as a cache for the larger flash memory?
(This implies a non-flat memory model, where page faults trigger an interrupt that performs the page swap)

Thanks

\$\endgroup\$

1 Answer 1

5
\$\begingroup\$

Generally speaking, RTOS and VM are mutually exclusive. The RT in RTOS stands for "Real Time", meaning that the OS has a quick (and deterministic) task swap time and IRQ latency. You can't really have that when some of your memory is located in Flash/SSD/HD and might have to be swapped into main memory.

Another two features that you don't really see together is "small memory footprint" and VM. You don't define what "small memory footprint" is, so I'm defining it as "the most amount of ram you'd find embedded with the CPU". Or about 128Kbytes. VM is rarely used in these systems, due to needing RT performance and usually having limited amounts of off-chip storage. If the RAM is external, you can always use larger chips to get rid of the need for VM.

Your best bet is to use a non-RT OS that has some RT extensions. Linux is the first thing that comes to mind here, but I would hardly describe it as having a "small memory footprint". I have not seen other RTOS's that can do this. I'm not saying that they don't exist, just that I haven't seen them. If you do find one, I'd be wary of it since it definitely isn't mainstream and probably has some issues (that may or may not matter to you).

\$\endgroup\$
5
  • \$\begingroup\$ Thanks for the insight. The idea was that we'll have both time-critical and non-time-critical tasks running there. The time-critical memory will be pinned. So while swapping a page a time critical thread could still be running "in the background" with low latency. \$\endgroup\$ Commented Jul 17, 2011 at 16:07
  • \$\begingroup\$ @Amir Gonnen for this Linux is the answer. David clearly explains the situation. Depending on your processor and storage, you may be able to get some form of Linux work in this manner. Alternative is to use two processors, one dedicated for RTOS tasks and another one for Linux and simple PRC between them. Very clean architecturally but expensive. \$\endgroup\$
    – Frank
    Commented Jul 21, 2011 at 2:35
  • \$\begingroup\$ @Frank Which flavor of Linux would have the smallest memory footprint and still be suitable for this scenario? (and what is, more or less, the memory footprint?) \$\endgroup\$ Commented Jul 21, 2011 at 6:40
  • \$\begingroup\$ @Amir, I suggest we put a question for this.. I have some experience with RTOS linux but it was neither good nor small.. \$\endgroup\$
    – Frank
    Commented Jul 22, 2011 at 4:11
  • \$\begingroup\$ You might want to look at using altera's NIOS II or Xilinx microblaze. A large enough device could hold a couple of separate instances of a CPU for the architecture Frank suggested. \$\endgroup\$
    – steverino
    Commented Jun 25, 2015 at 6:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.