- Year not given · 4+4 marks
Real-time versus ordinary software and OS; data acquisition
Short answer
Real-time software must meet fixed time limits; non-real-time only needs correct results. RTOS differs from general OS in goal (deadlines vs throughput), scheduling (priority pre-emptive vs time-sharing), and predictable bounded response. A data acquisition system uses producer-consumer processes with a circular buffer to handle sensor data.
How do real time software and OS differ from non-real time software and OS? Describe data acquisition system.
Real-time software must produce correct results within fixed time limits; non-real-time software only needs correct results, and speed is a matter of convenience. The OS under them differs in the same way.
Real-time vs non-real-time software
| Point | Real-time software | Non-real-time software |
|---|---|---|
| Correctness | Depends on result and timing | Depends on result only |
| Deadlines | Hard or soft deadlines must be met | No strict deadlines |
| Input | Stimuli from sensors (periodic and aperiodic) | Mostly user commands and files |
| Design model | Stimulus–response, concurrent processes, state machines | Mostly sequential or request-driven |
| Predictability | Timing must be predictable (worst case analysed) | Average performance is enough |
| Failure effect | Can damage equipment or endanger life | Usually inconvenience or data re-entry |
| Example | Pacemaker, ABS brakes, flight control | Word processor, payroll, web browser |
Real-time OS vs general-purpose OS
| Point | RTOS | General-purpose OS |
|---|---|---|
| Goal | Meet deadlines, predictability | Throughput, fairness, user convenience |
| Scheduling | Priority-based, pre-emptive | Time-sharing, fair share |
| Response time | Bounded and deterministic | Variable |
| Interrupt latency | Very low, guaranteed | Not guaranteed |
| Size | Small, often in ROM | Large, many features |
| Examples | VxWorks, FreeRTOS, QNX | Windows, standard Linux, macOS |
Data acquisition system
A data acquisition system collects data from sensors, often at high speed, and processes it for later display, analysis or storage. Sensors may produce data faster than it can be processed, so the system is designed as a producer–consumer pair of concurrent processes connected by a circular (ring) buffer.
+---------+ +----------+ +----------+ +---------+
| Sensors |--->| Sensor |--->| Circular |--->| Process |
| | | process | | buffer | | data |
+---------+ | (produce)| | | |(consume)|
+----------+ +----------+ +---------+
|
v
+---------+
| Display |
+---------+
How it works:
- The sensor (producer) process reads sensor values at fixed intervals and puts them into the buffer.
- The processing (consumer) process takes values from the buffer, converts and analyses them, and sends results to display or storage.
- The buffer absorbs differences in speed between the two processes.
- Mutual exclusion stops producer and consumer accessing the same buffer slot at once; the producer must wait (or overwrite old data) when the buffer is full, and the consumer waits when it is empty.
Example: in a nuclear reactor, neutron flux sensors are read continuously; the readings are buffered, processed to compute the flux level, and shown on the operator's display. Other examples are weather stations and patient-monitoring systems.
✓ Answer checked by Claude Sonnet 5.5
Related questions
- General OS versus real-time OS · Software Engineering, chapter 4
- Real-time system and real-time OS components · Software Engineering, chapter 4
- Designing software for real-time environments · Software Engineering, chapter 4
- Embedded real-time software; model for project · Instrumentation II, chapter 9
- Preemptive vs non-preemptive; real-time scheduling · Operating System, chapter 2
- Blocks of a data acquisition system · Digital Control System, chapter 1 · asked 2×
- Data acquisition system and tracking/hold modes · Digital Control System, chapter 1