Nepedia
Back to Discover
Advanced Reader
💻

Real-time computing

technology Maturity 9-11 Next article →

Real-time computing (RTC) is a specialized branch of computer science. It focuses on hardware and software systems that must follow a "real-time constraint." This constraint means the system must respond to an event within a specific timeframe. This required time is known as a deadline. In these systems, correctness depends on more than just the right answer. The timing of the answer is just as important as the logic behind it. If a response arrives after its deadline, the operation is not considered successful. These systems often operate in milliseconds or even microseconds to ensure precision.

To understand how these systems work, imagine a continuous loop of interaction. A real-time system receives data from its surrounding environment. It then processes this incoming data through its software. Finally, it returns a result quickly enough to affect the environment at that exact moment. To manage this complex loop, engineers use specific frameworks. These include synchronous programming languages, real-time networks, and real-time operating systems, also called RTOSes. An RTOS provides the necessary structure to ensure tasks are completed on time. These tools allow the computer to control physical processes with high accuracy.

Real-time systems are categorized by how they handle missed deadlines. There are three main types: hard, firm, and soft. Hard real-time systems are the most strict. In these systems, missing a single deadline results in a total system failure. Firm real-time systems sit in the middle. If they miss a deadline, the result becomes useless, but the system can continue to function. Soft real-time systems are the most flexible. In these cases, a missed deadline merely degrades the quality of service. The system continues to work, but the performance is not optimal.

The history of real-time computing began with early computer simulations. In these simulations, the computer's clock ran at the same speed as a real-world clock. This was known as real-time simulation. Later, in the 1970s, the rise of minicomputers increased the need for low-latency responses. These machines were often built into dedicated embedded systems, such as DOG scanners. During this era, companies developed specialized operating systems. Data General created RDOS, which stands for Real-Time Disk Operating System. Digital Equipment Corporation developed RT-11. These systems introduced scheduling methods to manage different tasks.

Scheduling is the method used to decide which task gets to use the CPU. In multitasking systems, this is often a priority-driven policy called a pre-emptive scheduler. This allows high-priority tasks to take control of the processor immediately. Some hard real-time schedulers use a method called rate-monotonic scheduling. This requires knowing the worst-case estimate for how long a task will take to execute. Another method is called earliest deadline first. This algorithm is effective for system loads that are less than 100 percent. These complex mathematical rules ensure that the most important jobs always finish on time.

Hard real-time systems are critical for safety and physical stability. For example, fly-by-wire aircraft controls must react immediately to pilot inputs. Car engine control systems are also hard real-time because a delayed signal can cause engine damage. Medical devices, such as heart pacemakers, require these strict guarantees to protect human lives. Even household items like printers use hard real-time logic. An inkjet printer must deposit ink at the exact moment the printhead crosses the page. A laser printer must activate its laser at the precise moment it scans the drum. If these timings fail, the output will be misaligned or incorrect.

Soft real-time systems are common in digital entertainment and communication. Video games are a great example of this. A game tries to meet a target frame rate to keep movement smooth. If the computer misses a deadline, the frame rate drops, but the game continues. Live audio and video systems also function this way. If a frame of video is delayed, you might see a brief glitch or a stutter. However, the system can recover using workload prediction. Similarly, commercial airliner flight plans are updated using soft real-time methods. These plans must stay current, but they can handle a latency of a few seconds without danger.

Real-time computing is also vital in digital signal processing, or DSP. In a DSP process, the system analyzes input samples and generates output samples continuously. For the system to be truly real-time, the processing delay must be bounded. This means the delay cannot grow indefinitely even if the processing continues forever. The mean processing time per sample must be no greater than the sampling period. This ensures that the computer can keep up with the constant stream of incoming information. By mastering these timing constraints, engineers can build machines that interact safely and effectively with our physical world.

805 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.