Real time programming means that certain things have to be done by a certain time or they become pointless.Originally posted by Shadow12345
What do you mean real time programming
For example imagine you are writing a DVD software program.
Lets say you are computing the images to put on screen, and then when the correct time comes up you send the image to the monitor.
Now lets say that your processor is too slow and you reach a time when you have to put an image to the screen, but you having finished processing/creating the image yet. A real-time system has to know that it missed its chance and therefore should stop decoding the image and move on to work on other frames. Real time programs also have to predict wheter it can finish a task on time, and if they can't finish it on time, they shouldn't even start working on it ( because they will end up making eveything afterwards later ). So if your processor is too slow it may only be getting up 3 out of four frames, but the video will still be playing at the correct speed.
If the system wasn't real time it would just wait for the image to be done and then show it, so the user would see their movie running in slower and slower motion ( which is not acceptable ).
An example of something that isn't real-time is your compiler. It doesn't stop if it's taking too long. It just keeps going, until it finishes.
Real time program is not better then regular execution, it's just for different purposes then standard execution. In reality Real-time programs are less efficient then non-real-time programs, because the time spent on the overhead of scheduling means that less actual work is being done. But, like i said, it is nessecary for certain applications