A real-time system is a computer system that requires "correct" computing results within a specific period of the time. The results produced after that deadline are neglected, even if correct because they don't remain to have real value.
Real-time systems executing on traditional computer hardware are used in a more number of applications. In addition, many real-time systems are embedded in "specialized devices," such as regular home appliances (for example, microwave ovens and dishwashers), consumer digital devices (for example, cameras and MP3 players), and communication devices (for example, cell-phones and Android devices). They are also present in other applications, like automobiles and airplanes.
Real-time computing is of two types: hard and soft.
A hard real-time system has the most demanding requirements, guaranteeing that complicated real-time tasks be completed within their deadlines. Safety-critical systems are typically hard real-time systems.
A soft real-time system is less restrictive, simply providing that a critical real-time task will receive priority over other tasks and that it will retain that priority until it completes.
The following characteristics are typical of many real-time systems:
- Single purpose
- Small size
- Inexpensively mass-produced
- Specific timing requirements
The Main goal of an RTOS scheduler:
Meeting timing constraints - the deadlines - in spite of other scheduling policies. e.g. If you have five homework assignments and only one is due the next day, you will probably work on that one! So, fairness does not help you meet deadlines.
Requirements of RTOS
- Responsiveness (quoted by vendors)
- Fast process/thread switch
- Fast interrupt response
- User control over OS policies
- Mainly scheduling, many priority levels
- Memory support (especially embedded)
Typical RTOS Task Model
Each task a triplet: (execution time, period, deadline)
Usually, deadline = period
It can be initiated any time during the period
Features of RTOS
- A variety of peripheral devices, such as graphical displays, CD drives, and DVD drives.
- Protection and security mechanisms
- Multiple users