Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
What is the difference in programmnig Real time systems, embedded, and regular (desktop) systems. Is there special training you need to program in c/c++ on one of these systems as opposed to a desktop linux or windows system? Is it the tools used to program? or maybe a combination of the two or even something I haven't thought of here.
Thanks in advance.
Posted
Comments
jimd1968 25-Jan-11 11:26am    
Thank you everyone for your answers. I understand it much better now.

Having programmed all three kinds, I must say that the answer depends a lot on your target platform. For example, programming for iPhone definitely qualifies as embedded, yet the skills you need are nearly identical to what you need to program for Mac. On the other hand, programming custom hardware would often require a working knowledge of in-circuit emulators, logic analyzers, and perhaps even oscilloscopes. An ability to read assembly language and relative fluency in binary operations is often assumed as well.

In general, programmers of embedded systems must be a lot more conscious about their memory use: situations when the system memory is expressed in single-digit kilobytes are not unusual. Very often you would have no operating system, so you'd need to fully understand low-level hardware interactions, interrupts, hardware timers, etc.

Real-time programming requires a different mindset altogether. The language you use becomes secondary to the way you think about resources, synchronization, schedules, memory allocations, and especially algorithms. For example, amortized linear-time algorithms do not qualify as linear-time algorithms, quick sort becomes an O(N^2) in your mind, and mainstream things such as lazy initialization become completely irrelevant. Pre-allocation becomes the order of the day, and formal verification of your most critical code becomes a requirement, not a luxury. On top of that, real-time operating systems present services that are different from what you would find on a typical desktop, so a lot of additional learning is in order.
 
Share this answer
 
Comments
Yusuf 25-Jan-11 11:20am    
VG +5
Nish Nishant 25-Jan-11 16:04pm    
Great answer, my 5 too.
I've found this quite helpful over the years:
ACE[^]

You'll find some info about supported OS'es, including Windows CE, pSOS, QNX Neutrino, and VxWorks, here:http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/ACE-INSTALL.html[^]

As can be seen from the ACE, TAO, and CIAO Success Stories[^], this IS actually rocket science, and it has been used for quite a number of serious real-time applications.

Regards
Espen Harlinn
 
Share this answer
 
v2
The question is really too generic to answer. In general, for real-time systems you are going to use a RTOS rather than a general-purpose OS like Windows. As for "embedded" systems they range from simple devices with no OS, minimal memory and only a C compiler, to powerful mini-computers that can be even programmed with high-level languages like Java.
 
Share this answer
 
I would venture to suggest that it is none of the above. The development tools and language are less critical than a very good understanding of the target platform/system. For example, I could write an embedded program in C but it would probably not be very efficient, because although I am a reasonable C programmer, I know almost nothing about embedded systems.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900