The nature of real-time programming is one of the subjects that software engineers love to discuss at length, often giving a range of contradictory definitions. I will begin by setting out what I think is important about real time.
A task is a real-time task if it has to complete before a certain point in time, known as the deadline. The distinction between real-time and nonreal-time tasks is shown by considering what happens when you play an audio stream on your computer while compiling the Linux kernel. The first is a real-time task because there is a constant stream of data arriving at the audio driver, and blocks of audio samples have to be written to the audio interface at the playback rate. Meanwhile, the compilation is not real time because there is no deadline. You simply want it to complete as soon as possible; whether it takes 10 seconds or 10 minutes...