A common misconception about VxWorks is that it doesn’t have memory protection. Other forms of this myth maybe that you can only program VxWorks with flat memory tasks and that it doesn't support processes a la Unix. Now I suspect the root of the myth is from the pre-VxWorks version 6.x days and the lack of memory protection in the OS. I think there are also some myths to be busted about memory protection:
Busting some myths around memory protection:
Let me state upfront that I think hardware-supported memory protection is important and necessary feature of modern operating systems. I also think memory protection in RTOSs is represented as absolutely necessary for safety, security and reliability. Let’s consider the following:
- Memory protection does help build more reliable systems if programmers run their code in memory protected processes. The additional protection from the OS can prevent bad code from trampling other parts of the system.
- Buggy code is buggy code and incorrect behavior can still cause system failures (system can be larger scope – think entire hardware and software) with or without memory protection.
- Millions and possibly billions of reliable systems have been shipped with non-memory protected operating systems. These systems are safe and reliable because they were designed and more importantly, tested, to be safe.
- Hardware support for memory protection (typically called a Memory Management Unit or MMU) is not available on all processors. Although this is becoming less and less common, there are entire classes of processors that do not have MMUs. Does this mean you can’t build mission or safety critical systems with these chips? Obviously that is not the case.
- Operating systems with memory protection are not immune to failure. Operating systems are as strong as their weakest link and failures in the kernel, for example, can still cause a system wide crash. No kernel can claim to be error free.
Busting another myth: VxWorks doesn’t have memory protection
VxWorks has, for many years, supported hardware memory protection. Programmers can write code in Real Time Processes (RTPs) which have full memory protection much like processes in Unix, Linux and other RTOSs. In addition, VxWorks is certified POSIX conformant so developers can use standard programming APIs if they wish, including processes and threads. Myth, busted.
Bill Graham is the product marketing manager for VxWorks platforms at Wind River. He has over 20 years of experience in the software industry, including embedded and real-time systems development, UML modeling, and object-oriented design. Prior to joining Wind River, Bill held marketing and product management positions at QNX, IBM Rational, and Klocwork. Prior to his career in marketing, Bill was a software engineer at ObjecTime, Cross Keys and Lockheed Martin. Bill holds a Bachelor’s and Master’s Degree in Electrical Engineering from Carleton University in Ottawa, Canada.

Comments