Real-time computing (RTC) is the
computer science
Computer science is the study of computation, information, and automation. Computer science spans Theoretical computer science, theoretical disciplines (such as algorithms, theory of computation, and information theory) to Applied science, ...
term for
hardware and
software
Software consists of computer programs that instruct the Execution (computing), execution of a computer. Software also includes design documents and specifications.
The history of software is closely tied to the development of digital comput ...
systems subject to a "real-time constraint", for example from
event to
system response. Real-time programs must guarantee response within specified time constraints, often referred to as "deadlines".
[ Ben-Ari, Mordechai; "Principles of Concurrent and Distributed Programming", ch. 16, Prentice Hall, 1990, , p. 164]
The term "real-time" is also used in
simulation
A simulation is an imitative representation of a process or system that could exist in the real world. In this broad sense, simulation can often be used interchangeably with model. Sometimes a clear distinction between the two terms is made, in ...
to mean that the simulation's clock runs at the same speed as a real clock.
Real-time responses are often understood to be in the order of milliseconds, and sometimes microseconds. A system not specified as operating in real time cannot usually ''guarantee'' a response within any timeframe, although ''typical'' or ''expected'' response times may be given. Real-time processing ''fails'' if not completed within a specified deadline relative to an event; deadlines must always be met, regardless of
system load.
A real-time system has been described as one which "controls an environment by receiving data, processing them, and returning the results sufficiently quickly to affect the environment at that time". The term "real-time" is used in
process control
Industrial process control (IPC) or simply process control is a system used in modern manufacturing which uses the principles of control theory and physical industrial control systems to monitor, control and optimize continuous Industrial processe ...
and
enterprise systems to mean "without significant delay".
Real-time software may use one or more of the following:
synchronous programming languages,
real-time operating system
A real-time operating system (RTOS) is an operating system (OS) for real-time computing applications that processes data and events that have critically defined time constraints. A RTOS is distinct from a time-sharing operating system, such as Unix ...
s (RTOSes), and real-time networks. Each of these provide essential frameworks on which to build a real-time software application.
Systems used for many
safety-critical
A safety-critical system or life-critical system is a system whose failure or malfunction may result in one (or more) of the following outcomes:
* death or serious injury to people
* loss or severe damage to equipment/property
* environmental h ...
applications must be real-time, such as for control of
fly-by-wire
Fly-by-wire (FBW) is a system that replaces the conventional aircraft flight control system#Hydro-mechanical, manual flight controls of an aircraft with an electronic interface. The movements of flight controls are converted to electronic sig ...
aircraft, or
anti-lock brakes, both of which demand immediate and accurate mechanical response.
History
The term ''real-time'' derives from its use in early
simulation
A simulation is an imitative representation of a process or system that could exist in the real world. In this broad sense, simulation can often be used interchangeably with model. Sometimes a clear distinction between the two terms is made, in ...
, where a real-world process is simulated at a rate which matched that of the real process (now called
real-time simulation
Real-time simulation refers to a computer model of a physical system that can execute at the same rate as actual "wall clock" time. In other words, the computer model runs at the same rate as the actual physical system. For example, if a tank take ...
to avoid ambiguity).
Analog computer
An analog computer or analogue computer is a type of computation machine (computer) that uses physical phenomena such as Electrical network, electrical, Mechanics, mechanical, or Hydraulics, hydraulic quantities behaving according to the math ...
s, most often, were capable of simulating at a much faster pace than real-time, a situation that could be just as dangerous as a slow simulation if it were not also recognized and accounted for.
Minicomputers, particularly in the 1970s onwards, when built into dedicated
embedded system
An embedded system is a specialized computer system—a combination of a computer processor, computer memory, and input/output peripheral devices—that has a dedicated function within a larger mechanical or electronic system. It is e ...
s such as DOG (
Digital on-screen graphic
A digital on-screen graphic, digitally originated graphic (DOG, bug, network bug, or screenbug) is a watermark-like station logo that most television broadcasters overlay over a portion of the screen area of their programs to identify the channel ...
) scanners, increased the need for low-latency priority-driven responses to important interactions with incoming data. Operating systems such as
Data General
Data General Corporation was an early minicomputer firm formed in 1968. Three of the four founders were former employees of Digital Equipment Corporation (DEC).
Their first product, 1969's Data General Nova, was a 16-bit minicomputer intended to ...
's
RDOS (Real-Time Disk Operating System) and RTOS with
background and foreground scheduling as well as
Digital Equipment Corporation
Digital Equipment Corporation (DEC ), using the trademark Digital, was a major American company in the computer industry from the 1960s to the 1990s. The company was co-founded by Ken Olsen and Harlan Anderson in 1957. Olsen was president until ...
's
RT-11
RT-11 (Real-time 11) is a discontinued small, low-end, single-user real-time operating system for the full line of Digital Equipment Corporation PDP-11 16-bit computers. RT-11 was first implemented in 1970. It was widely used for real-time compu ...
date from this era. Background-foreground scheduling allowed low priority tasks CPU time when no foreground task needed to execute, and gave absolute priority within the foreground to threads/tasks with the highest priority. Real-time operating systems would also be used for
time-sharing
In computing, time-sharing is the Concurrency (computer science), concurrent sharing of a computing resource among many tasks or users by giving each Process (computing), task or User (computing), user a small slice of CPU time, processing time. ...
multiuser duties. For example,
Data General Business Basic
Data General Business Basic was a BASIC interpreter (based on a version from MAI Basic Four) marketed by Data General for their Nova minicomputer in the 1970s, and later ported to the Data General Eclipse MV and AViiON computers. Most bus ...
could run in the foreground or background of RDOS and would introduce additional elements to the scheduling algorithm to make it more appropriate for people interacting via
dumb terminal
A computer terminal is an electronic or electromechanical hardware device that can be used for entering data into, and transcribing data from, a computer or a computing system. Most early computers only had a front panel to input or display ...
s.
Early personal computers were sometimes used for real-time computing. The possibility of deactivating other interrupts allowed for hard-coded loops with defined timing, and the low
interrupt latency
In computing, interrupt latency refers to the delay between the start of an Interrupt Request (IRQ) and the start of the respective Interrupt Service Routine (ISR). For many operating systems, devices are serviced as soon as the device's interru ...
allowed the implementation of a real-time operating system, giving the user interface and the disk drives lower priority than the real-time thread. Compared to these the
programmable interrupt controller
In computing, a programmable interrupt controller (PIC) is an integrated circuit that helps a microprocessor (or CPU) handle interrupt requests (IRQs) coming from multiple different sources (like external I/O devices) which may occur simultane ...
of the Intel CPUs (8086..80586) generates a very large latency and the Windows operating system is neither a real-time operating system nor does it allow a program to take over the CPU completely and use its own
scheduler
A schedule (, ) or a timetable, as a basic time-management tool, consists of a list of times at which possible tasks, events, or actions are intended to take place, or of a sequence of events in the chronological order in which such things ...
, without using native machine language and thus bypassing all interrupting Windows code. However, several coding libraries exist which offer real time capabilities in a high level language on a variety of operating systems, for example
Java Real Time. Later microprocessors such as the
Motorola 68000
The Motorola 68000 (sometimes shortened to Motorola 68k or m68k and usually pronounced "sixty-eight-thousand") is a 16/32-bit complex instruction set computer (CISC) microprocessor, introduced in 1979 by Motorola Semiconductor Products Sector ...
and subsequent family members (68010, 68020,
ColdFire etc.) also became popular with manufacturers of industrial control systems. This application area is one where real-time control offers genuine advantages in terms of process performance and safety.
Criteria for real-time computing
A system is said to be ''real-time'' if the total correctness of an operation depends not only upon its logical correctness, but also upon the time in which it is performed. Real-time systems, as well as their deadlines, are classified by the consequence of missing a deadline:
* ''Hard'' missing a deadline is a total system failure.
* ''Firm'' infrequent deadline misses are tolerable, but may degrade the system's quality of service. The usefulness of a result is zero after its deadline.
* ''Soft'' the usefulness of a result degrades after its deadline, thereby degrading the system's quality of service.
Thus, the goal of a ''hard real-time system'' is to ensure that all deadlines are met, but for ''soft real-time systems'' the goal becomes meeting a certain subset of deadlines in order to optimize some application-specific criteria. The particular criteria optimized depend on the application, but some typical examples include maximizing the number of deadlines met, minimizing the lateness of tasks and maximizing the number of high priority tasks meeting their deadlines.
Hard real-time systems are used when it is imperative that an event be reacted to within a strict deadline. Such strong guarantees are required of systems for which not reacting in a certain interval of time would cause great loss in some manner, especially damaging the surroundings physically or threatening human lives (although the strict definition is simply that missing the deadline constitutes failure of the system). Some examples of hard real-time systems:
* A
car
A car, or an automobile, is a motor vehicle with wheels. Most definitions of cars state that they run primarily on roads, seat one to eight people, have four wheels, and mainly transport people rather than cargo. There are around one billio ...
engine
An engine or motor is a machine designed to convert one or more forms of energy into mechanical energy.
Available energy sources include potential energy (e.g. energy of the Earth's gravitational field as exploited in hydroelectric power ge ...
control system is a hard real-time system because a delayed signal may cause engine failure or damage.
* Medical systems such as heart
pacemakers. Even though a pacemaker's task is simple, because of the potential risk to human life, medical systems like these are typically required to undergo thorough testing and certification, which in turn requires hard real-time computing in order to offer provable guarantees that a failure is unlikely or impossible.
* Industrial process controllers, such as a machine on an
assembly line
An assembly line, often called ''progressive assembly'', is a manufacturing process where the unfinished product moves in a direct line from workstation to workstation, with parts added in sequence until the final product is completed. By mechan ...
. If the machine is delayed, the item on the assembly line could pass beyond the reach of the machine (leaving the product untouched), or the machine or the product could be damaged by activating the robot at the wrong time. If the failure is detected, both cases would lead to the assembly line stopping, which slows production. If the failure is not detected, a product with a defect could make it through production, or could cause damage in later steps of production.
* Hard real-time systems are typically found interacting at a low level with physical hardware, in
embedded system
An embedded system is a specialized computer system—a combination of a computer processor, computer memory, and input/output peripheral devices—that has a dedicated function within a larger mechanical or electronic system. It is e ...
s. Early video game systems such as the
Atari 2600
The Atari 2600 is a home video game console developed and produced by Atari, Inc. Released in September 1977 as the Atari Video Computer System (Atari VCS), it popularized microprocessor-based hardware and games stored on swappable ROM cartridg ...
and
Cinematronics
Cinematronics Incorporated was an arcade game video game developer, developer that primarily released vector graphics games in the late 1970s and early 1980s. While other companies released games based on raster graphics, raster displays, early ...
vector graphics had hard real-time requirements because of the nature of the graphics and timing hardware.
*
Softmodems replace a hardware modem with software running on a computer's
CPU. The software must run every few milliseconds to generate the next audio data to be output. If that data is late, the receiving modem will lose synchronization, causing a long interruption as synchronization is reestablished or causing the connection to be lost entirely.
* Many types of
printers
Printer may refer to:
Technology
* Printer (publishing), a person
* Printer (computing), a hardware device
* Optical printer for motion picture films
People
* Nariman Printer (fl. c. 1940), Indian journalist and activist
* James Printer (1 ...
have hard real-time requirements, such as
inkjet
Inkjet printing is a type of printer (computing), computer printing that recreates a digital image by propelling droplets of ink onto paper or plastic substrates. Inkjet printers were the most commonly used type of printer in 2008, and range f ...
s (the ink must be deposited at the correct time as the printhead crosses the page),
laser printer
Laser printing is an electrostatic digital printing process. It produces high-quality text and graphics (and moderate-quality photographs) by repeatedly passing a laser beam back and forth over a Electric charge, negatively charged cylinder call ...
s (the laser must be activated at the right time as the beam scans across the rotating drum), and dot matrix and various types of
line printer
A line printer Printer (computing), prints one entire line of text before advancing to another line. Most early line printers were
printer (computing)#Impact printers, impact printers.
Line printers are mostly associated with unit record eq ...
s (the impact mechanism must be activated at the right time as the print mechanism comes into alignment with the desired output). A failure in any of these would cause either missing output or misaligned output.
In the context of
multitasking systems the
scheduling policy is normally priority driven (
pre-emptive schedulers). In some situations, these can guarantee hard real-time performance (for instance if the set of tasks and their priorities is known in advance). There are other hard real-time schedulers such as
rate-monotonic which is not common in general-purpose systems, as it requires additional information in order to schedule a task: namely a bound or worst-case estimate for how long the task must execute. Specific algorithms for scheduling such hard real-time tasks exist, like
earliest deadline first, which, ignoring the overhead of
context switch
In computing, a context switch is the process of storing the state of a process or thread, so that it can be restored and resume execution at a later point, and then restoring a different, previously saved, state. This allows multiple processes ...
ing, is sufficient for system loads of less than 100%. New overlay scheduling systems, such as an
adaptive partition scheduler assist in managing large systems with a mixture of hard real-time and non real-time applications.
Firm real-time systems are more nebulously defined, and some classifications do not include them, distinguishing only hard and soft real-time systems. Some examples of firm real-time systems:
* The assembly line machine described earlier as ''hard'' real-time could instead be considered ''firm'' real-time. A missed deadline still causes an error which needs to be dealt with: there might be machinery to mark a part as bad or eject it from the assembly line, or the assembly line could be stopped so an operator can correct the problem. However, as long as these errors are infrequent, they may be tolerated.
Soft real-time systems are typically used to solve issues of concurrent access and the need to keep a number of connected systems up-to-date through changing situations. Some examples of soft real-time systems:
* Software that maintains and updates the flight plans for commercial
airline
An airline is a company that provides civil aviation, air transport services for traveling passengers or freight (cargo). Airlines use aircraft to supply these services and may form partnerships or Airline alliance, alliances with other airlines ...
rs. The flight plans must be kept reasonably current, but they can operate with the latency of a few seconds.
* Live audio-video systems are also usually soft real-time. A frame of audio which is played late may cause a brief audio glitch (and may cause all subsequent audio to be delayed correspondingly, causing a perception that the audio is being played slower than normal), but this may be better than the alternatives of continuing to play silence, static, a previous audio frame, or estimated data. A frame of video that is delayed typically causes even less disruption for viewers. The system can continue to operate and also recover in the future using workload prediction and reconfiguration methodologies.
* Similarly, video games are often soft real-time, particularly as they try to meet a target
frame rate
Frame rate, most commonly expressed in frame/s, or FPS, is typically the frequency (rate) at which consecutive images (Film frame, frames) are captured or displayed. This definition applies to film and video cameras, computer animation, and moti ...
. As the next image cannot be computed in advance, since it depends on inputs from the player, only a short time is available to perform all the computing needed to generate a frame of video before that frame must be displayed. If the deadline is missed, the game can continue at a lower frame rate; depending on the game, this may only affect its graphics (while the gameplay continues at normal speed), or the gameplay itself may be slowed down (which was common on older
third- and
fourth-generation consoles).
Real-time in digital signal processing
In a real-time
digital signal processing
Digital signal processing (DSP) is the use of digital processing, such as by computers or more specialized digital signal processors, to perform a wide variety of signal processing operations. The digital signals processed in this manner are a ...
(DSP) process, the analyzed (input) and generated (output) samples can be processed (or generated) continuously in the time it takes to input and output the same set of samples ''independent'' of the processing delay.
[Kuo, Sen M.; Lee, Bob H.; and Tian, Wenshun; "Real-Time Digital Signal Processing: Implementations and Applications", Wiley, 2006, ]
Section 1.3.4: ''Real-Time Constraints''
It means that the processing delay must be bounded even if the processing continues for an unlimited time. The
mean
A mean is a quantity representing the "center" of a collection of numbers and is intermediate to the extreme values of the set of numbers. There are several kinds of means (or "measures of central tendency") in mathematics, especially in statist ...
processing time per sample, including
overhead, is no greater than the sampling period, which is the reciprocal of the
sampling rate
In signal processing, sampling is the reduction of a continuous-time signal to a discrete-time signal. A common example is the conversion of a sound wave to a sequence of "samples".
A sample is a value of the signal at a point in time and/or s ...
. This is the criterion whether the samples are grouped together in large segments and processed as blocks or are processed individually and whether there are long, short, or non-existent
input and output buffers.
Consider an
audio DSP example; if a process requires 2.01 seconds to
analyze,
synthesize, or process 2.00 seconds of sound, it is not real-time. However, if it takes 1.99 seconds, it is or can be made into a real-time DSP process.
A common life analogy is standing in a line or
queue waiting for the checkout in a grocery store. If the line asymptotically grows longer and longer without bound, the checkout process is not real-time. If the length of the line is bounded, customers are being "processed" and output as rapidly, on average, as they are being inputted then that process ''is'' real-time. The grocer might go out of business or must at least lose business if they cannot make their checkout process real-time; thus, it is fundamentally important that this process is real-time.
A signal processing algorithm that cannot keep up with the flow of input data with output falling further and further behind the input, is not real-time. If the delay of the output (relative to the input) is bounded regarding a process which operates over an unlimited time, then that signal processing algorithm is real-time, even if the throughput delay may be very long.
Live vs. real-time
Real-time signal processing is necessary, but not sufficient in and of itself, for live signal processing such as what is required in
live event support
Live event support includes Staging (theatre, film, television), staging, scenery, mechanicals, Sound reinforcement system, sound, Stage lighting, lighting, video, special effects, transport, packaging, communications, costume and makeup for live ...
. Live audio digital signal processing requires both real-time operation and a sufficient limit to throughput delay so as to be tolerable to performers using
stage monitors or
in-ear monitor
An in-ear monitor (IEMs), in-ear, or colloquially earpiece is a listening device placed into the ear. More narrowly, the term in-ear monitor is defined as such a device used by musicians, audio engineers and audiophiles to listen to music or to ...
s and not noticeable as
lip sync error by the audience also directly watching the performers. Tolerable limits to latency for live, real-time processing is a subject of investigation and debate, but is estimated to be between 6 and 20 milliseconds.
Real-time bidirectional
telecommunications delays of less than 300 ms ("round trip" or twice the unidirectional delay) are considered "acceptable" to avoid undesired "talk-over" in conversation.
Real-time and high-performance
Real-time computing is sometimes misunderstood to be
high-performance computing
High-performance computing (HPC) is the use of supercomputers and computer clusters to solve advanced computation problems.
Overview
HPC integrates systems administration (including network and security knowledge) and parallel programming into ...
, but this is not an accurate classification.
For example, a massive
supercomputer
A supercomputer is a type of computer with a high level of performance as compared to a general-purpose computer. The performance of a supercomputer is commonly measured in floating-point operations per second (FLOPS) instead of million instruc ...
executing a scientific simulation may offer impressive performance, yet it is not executing a real-time computation. Conversely, once the hardware and software for an anti-lock braking system have been designed to meet its required deadlines, no further performance gains are obligatory or even useful. Furthermore, if a network server is highly loaded with network traffic, its response time may be slower, but will (in most cases) still succeed before it times out (hits its deadline). Hence, such a network server would not be considered a real-time system: temporal failures (delays, time-outs, etc.) are typically small and compartmentalized (limited in effect), but are not
catastrophic failure
A catastrophic failure is a sudden and total failure from which recovery is impossible. Catastrophic failures often lead to cascading systems failure. The term is most commonly used for structural failures, but has often been extended to many ot ...
s. In a real-time system, such as the
FTSE 100 Index
The Financial Times Stock Exchange 100 Index, also called the FTSE 100 Index, FTSE 100, FTSE, or, informally, the "Footsie" , is the United Kingdom's best-known stock market index of the 100 most highly capitalised blue chips listed on ...
, a slow-down beyond limits would often be considered catastrophic in its application context. The most important requirement of a real-time system is consistent output, not high throughput.
Some kinds of software, such as many
chess-playing programs, can fall into either category. For instance, a chess program designed to play in a tournament with a clock will need to decide on a move before a certain deadline or lose the game, and is therefore a real-time computation, but a chess program that is allowed to run indefinitely before moving is not. In both of these cases, however, high performance is desirable: the more work a tournament chess program can do in the allotted time, the better its moves will be, and the faster an unconstrained chess program runs, the sooner it will be able to move. This example also illustrates the essential difference between real-time computations and other computations: if the tournament chess program does not make a decision about its next move in its allotted time it loses the game—i.e., it fails as a real-time computation—while in the other scenario, meeting the deadline is assumed not to be necessary. High-performance is indicative of the amount of processing that is performed in a given amount of time, whereas real-time is the ability to get done with the processing to yield a useful output in the available time.
Near real-time
The term "near real-time" or "nearly real-time" (NRT), in
telecommunications
Telecommunication, often used in its plural form or abbreviated as telecom, is the transmission of information over a distance using electronic means, typically through cables, radio waves, or other communication technologies. These means of ...
and
computing
Computing is any goal-oriented activity requiring, benefiting from, or creating computer, computing machinery. It includes the study and experimentation of algorithmic processes, and the development of both computer hardware, hardware and softw ...
, refers to the time
delay introduced, by automated
data processing
Data processing is the collection and manipulation of digital data to produce meaningful information. Data processing is a form of ''information processing'', which is the modification (processing) of information in any manner detectable by an o ...
or
network transmission, between the occurrence of an event and the use of the processed data, such as for display or
feedback
Feedback occurs when outputs of a system are routed back as inputs as part of a chain of cause and effect that forms a circuit or loop. The system can then be said to ''feed back'' into itself. The notion of cause-and-effect has to be handle ...
and control purposes. For example, a near-real-time display depicts an event or situation as it existed at the current time minus the processing time, as nearly the time of the live event.
The distinction between the terms "near real time" and "real time" is somewhat nebulous and must be defined for the situation at hand. The term implies that there are no significant delays.
In many cases, processing described as "real-time" would be more accurately described as "near real-time".
Near real-time also refers to delayed real-time transmission of voice and video. It allows playing video images, in approximately real-time, without having to wait for an entire large video file to download. Incompatible databases can export/import to common flat files that the other database can import/export on a scheduled basis so they can sync/share common data in "near real-time" with each other.
Design methods
Several methods exist to aid the design of real-time systems, an example of which is
MASCOT
A mascot is any human, animal, or object thought to bring luck, or anything used to represent a group with a common public identity, such as a school, sports team, university society, society, military unit, or brand, brand name. Mascots are als ...
, an old but very successful method that represents the
concurrent structure of the system. Other examples are
HOOD, Real-Time UML,
AADL, the
Ravenscar profile The Ravenscar profile is a subset of the Ada tasking features designed for safety-critical hard real-time computing. It was defined by a separate technical report in Ada 95; it is now part of the Ada 2012 Standard. It has been named after the Engl ...
, and
Real-Time Java.
See also
*
Autonomous peripheral operation
*
Control system
A control system manages, commands, directs, or regulates the behavior of other devices or systems using control loops. It can range from a single home heating controller using a thermostat controlling a domestic boiler to large industrial ...
*
Failure detector
*
Nodal architecture
*
Processing modes
Processing is a free graphics library and integrated development environment (IDE) built for the electronic arts, new media art, and visual design communities with the purpose of teaching non-programmers the fundamentals of computer programmi ...
*
Ptolemy Project
*
Real-time data
Real-time data (RTD) is information that is delivered immediately after collection. There is no delay in the timeliness of the information provided. Real-time data is often used for navigation or tracking. Such data is usually data processing, proc ...
*
Real-time computer graphics
Real-time computer graphics or real-time rendering is the sub-field of computer graphics focused on producing and analyzing images in real time. The term can refer to anything from rendering an application's graphical user interface ( GUI) to ...
*
Real-time operating system
A real-time operating system (RTOS) is an operating system (OS) for real-time computing applications that processes data and events that have critically defined time constraints. A RTOS is distinct from a time-sharing operating system, such as Unix ...
*
Real-time testing
*
Remote diagnostics
*
Scheduling analysis real-time systems
*
Synchronous programming language
*
Time-utility function A Time/Utility Function (''TUF''), née ''Time/Value Function'', specifies the application-specific ''utility'' that an ''action'' (e.g., computational task, mechanical movement) yields depending on its completion time. TUFs and their utility interp ...
*
Ward–Mellor method
*
Worst-case execution time
References
Further reading
*
*.
*.
The International Journal of Time-Critical Computing Systems
External links
IEEE Technical Committee on Real-Time SystemsEuromicro Technical Committee on Real-time SystemsThe What, Where and Why of Real-Time Simulation*
*
{{DEFAULTSORT:Real-Time Computing
*