Linux has a slightly larger memory footprint than most conventional embedded operating systems when configured with equivalent options. This is the price you pay to leverage the advantages of its enormous desktop user base, and being able to share a common desktop and embedded environment. For most applications the difference is insignificant, but if every last byte counts in your application, you might want to consider RTEMs
Beware that commercial embedded operating system vendors often make meaningless
claims regarding the footprint of their micro-kernel, and the total memory footprint (and often the royalties payable) increases substantially once all the optional packages needed to provide the required functionality for a typical networked device are included. Work out what functionality you need before attempting to make valid comparisons.
For good architectural reasons, Linux isn't a micro-kernel. However, it does allow large chunks of code to be removed easily at configuration time. In practice
the architectural distinction between micro and monolithic kernels makes little
difference to total memory requirements of the overall system.
Minimum memory requirement when using an initrd
is generally 2 MB of flash ROM and 8 MB of RAM, and here's what you can expect to fit in:
- 8xxROM Monitor
- Linux-2.2.13 kernel
- minimal compressed initrd rootfilesystem? with /dev, /etc, /var and so forth.
- glibc-2.1.3 Shared C library, including pthreadssupport.
- inetd Internet server
- ftpd FTP server (for field flash ROM upgrades)
- Medium sized Embedded C++ application (~200 Kb)
This is the most common configuration because it attempts to minimize ROM space
at the expense of RAM, since ROM is generally more expensive. However, you can trade off ROM space to reduce RAM usage by using a compressed flash file system and/or running the kernel directly from ROM. Both these options are more difficult, but have been successfully deployed and discussed on the linuxppc-embeddedmailinglist