A real-time system is defined as a data processing system in which the time interval required to process and respond to inputs is so small that it controls the environment. In this type of operating system, the response time is very less as compared to online processing.
Real-time systems are used when there are rigid time requirements on the operation of a processor or the flow of data. A real-time operating system must have well-defined, fixed time constraints, otherwise the system will fail.