Some computers must work very fast. They must do a job right away. This helps cars and planes stay safe. If they are slow, things might break. It is good to be quick! Do you like fast things?
Some computers must work very fast. They must do a job right away. This helps cars and planes stay safe.
These fast computers have a set time to finish. We call this a deadline. If they miss the deadline, the job fails. This can be very bad.
Some jobs are very important. A car engine needs a quick answer. A heart machine also needs to be fast.
Other jobs can be a little slow. A video game might slow down if it is late. A movie might have a small glitch. These are okay.
It is good to be quick and right. Fast computers keep many things working well.
Some computers must work very fast. They must do a job right away. This is called real-time computing. In these systems, being right is not enough. The computer must also be on time. We call these set times deadlines. If a computer misses a deadline, the job fails.
There are different kinds of deadlines. Hard real-time systems must never miss a deadline. If they do, the whole system fails. This is used for safety. For example, car brakes and airplane controls must work instantly. A heart pacemaker is also a hard real-time system. If it is late, it could hurt a person.
Other systems are a bit more relaxed. These are soft real-time systems. If they miss a deadline, the quality just drops. A video game might slow down. A movie might have a small glitch. These are not as dangerous.
Some systems are in the middle. These are called firm real-time systems. If they miss a deadline, the result is no longer useful. But the system can still keep working. Real-time systems help keep our world running safely and smoothly.
Computers do many jobs every day. Most computers try to be fast, but they do not always have to be perfectly on time. Real-time computing is different. In these systems, being correct is not enough. The computer must also finish its work within a specific time. This set time is called a deadline. If a real-time system misses a deadline, the whole process can fail. These systems often work in milliseconds or even microseconds.
How does this way of working actually happen? A real-time system works by receiving data from its environment. It then processes that data very quickly. Finally, it sends back a result to affect the environment. This happens in a continuous loop. To keep things organized, these systems use special tools. They might use real-time operating systems, or RTOSes. They also use special programming languages and networks. These tools help the computer manage its many tasks.
People have used the term "real-time" for a long time. It started with early computer simulations. In those cases, the simulation clock matched a real clock. In the 1970s, minicomputers made real-time needs grow. These machines were used in things like DOG scanners. During this time, new operating systems were created. Data General made an operating system called RDOS. Digital Equipment Corporation made one called RT-11. These systems used scheduling to manage different tasks.
There are three main ways to group these systems. Hard real-time systems must never miss a deadline. If they do, the system fails completely. This is vital for safety. Examples include car engines, medical pacemakers, and airplane controls. Firm real-time systems are in the middle. If they miss a deadline, the result is not useful anymore. However, the system can still keep working. Soft real-time systems are more relaxed. If a deadline is missed, the quality just drops.
You can see these systems in your own life. A video game is often a soft real-time system. If the computer is slow, the game might just have a lower frame rate. A printer is often a hard real-time system. An inkjet printer must drop ink at the exact right moment. If it is late, the image will look wrong. Even watching a live video is a soft real-time task. If the data is late, you might see a small glitch.
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.
More to explore
✨ What else?
Related topics you might enjoy
🔬 Go deeper
More advanced topics to explore
🪜 Step back
Simpler topics to build understanding
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.