Content deleted Content added
HeyElliott (talk | contribs) |
m unpiped links using script |
||
(10 intermediate revisions by 9 users not shown) | |||
Line 1:
{{short description|Study of hardware and software systems that have a "real-time constraint"}}
{{distinguish|text=[[Real-time communication]] or [[Real-time clock]], closely related technologies that are also often abbreviated to RTC}}
{{
'''Real-time computing''' ('''RTC''') is the [[computer science]] term for [[Computer hardware|hardware]] and [[software]] systems subject to a "real-time constraint", for example from [[Event (synchronization primitive)|event]] to [[Event (computing)|system response]].<ref>{{Cite web |title=FreeRTOS – Open Source RTOS Kernel for small embedded systems – What is FreeRTOS FAQ? |url=https://www.freertos.org/FAQWhat.html#WhyUseRTOS |access-date=2021-03-08 |website=FreeRTOS |language=en-US}}</ref> Real-time programs must guarantee response within specified time constraints, often referred to as "deadlines".<ref name="Ben-Ari-pg164">[[Mordechai Ben-Ari|Ben-Ari, Mordechai]]; "Principles of Concurrent and Distributed Programming", ch. 16, Prentice Hall, 1990, {{ISBN|0-13-711821-X}}, p. 164</ref>
Line 7:
The term "real-time" is also used in [[Computer simulation|simulation]] 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 [[
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".<ref>{{cite book |last=Martin |first=James |url=https://archive.org/details/programmingrealt0000mart |title=Programming Real-time Computer Systems |date=1965 |publisher=Prentice-Hall Incorporated |isbn=978-0-13-730507-0 |___location=Englewood Cliffs, New Jersey |page=[https://archive.org/details/programmingrealt0000mart/page/4 4] |language=en-us |url-access=registration}}</ref> The term "real-time" is used in [[Industrial control system|process control]] and [[enterprise system]]s to mean "without significant delay".
Real-time software may use one or more of the following: [[synchronous programming language]]s, [[real-time operating system]]s (RTOSes), and real-time networks
Systems used for many [[
| url = https://books.google.com/books?id=3714jIryozYC&pg=PA356
| title = Computer-Based Industrial Control
Line 23:
== History ==
The term ''real-time'' derives from its use in early [[simulation]],
Minicomputers, particularly in the 1970s onwards, when built into dedicated [[embedded system]]s such as DOG ([[Digital on-screen graphic]]) scanners, increased the need for low-latency priority-driven responses to important interactions with incoming data.
▲Once when the [[MOS Technology 6502]] (used in the [[Commodore 64]] and [[Apple II series|Apple II]]), and later when the [[Motorola 68000]] (used in the [[Mac (computer)|Macintosh]], [[Atari ST]], and [[Amiga]]) were popular, anybody could use their home computer as a real-time system. The possibility to deactivate other interrupts allowed for hard-coded loops with defined timing, and the low [[interrupt latency]] 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]] 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 [[Scheduling (computing)|scheduler]], without using native machine language and thus surpassing 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 [[Real time Java|Java Real Time]]. The [[Motorola 68000]] and subsequent family members (68010, 68020 etc.) also became popular with manufacturers of industrial control systems. This application area is one in which real-time control offers genuine advantages in terms of process performance and safety.{{citation needed|date=September 2013|reason=This whole paragraph contains several questionable statements in regard to MOS, AMD and Motorola CPUs and their interrupt handling, and therefore needs to be rewritten and sourced by reliable sources.}}
== {{anchor|Hard|Firm|Require|Soft}}Criteria for real-time computing ==
Line 39 ⟶ 38:
'''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 [[
* Medical systems such as heart [[
* Industrial process controllers, such as a machine on an [[assembly line]]. 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]]s. Early video game systems such as the [[Atari 2600]] and [[Cinematronics]] vector graphics had hard real-time requirements because of the nature of the graphics and timing hardware.
* [[Softmodem]]s replace a hardware modem with software running on a computer's [[
* Many types of [[Printer (computing)|printers]] have hard real-time requirements, such as [[inkjet]]s (the ink must be deposited at the correct time as the printhead crosses the page), [[laser printer]]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]]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 [[Computer multitasking|multitasking]] systems the [[scheduling policy]] is normally priority driven ([[Preemptive multitasking|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 scheduling|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,
'''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:
Line 53 ⟶ 52:
'''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]]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
* Similarly, video games are often soft real-time, particularly as they try to meet a target [[frame rate]]. 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 generation of video game consoles|third-]] and [[Fourth generation of video game consoles|fourth-generation consoles]]).
=== Real-time in digital signal processing ===
In a real-time [[digital signal processing]] (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.<ref name="Kuo-Lee-Tian">Kuo, Sen M.; Lee, Bob H.; and Tian, Wenshun; "Real-Time Digital Signal Processing: Implementations and Applications", Wiley, 2006, {{ISBN|0-470-01495-4}}, [http://media.wiley.com/product_data/excerpt/54/04700149/0470014954.pdf Section 1.3.4: ''Real-Time Constraints''].</ref> It means that the processing delay must be bounded even if the processing continues for an unlimited time.
Consider an [[Audio signal processing|audio DSP]] example; if a process requires 2.01 seconds to [[Audio analysis|analyze]], [[Sound synthesis|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.
Line 63 ⟶ 62:
A common life analogy is standing in a line or [[Queue area|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
==== 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 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 monitor]]s or [[in-ear monitor]]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.<ref>{{cite journal|last1=Kudrle|first1=Sara|last2=Proulx|first2=Michel|last3=Carrieres|first3=Pascal|last4=Lopez|first4=Marco|title=Fingerprinting for Solving A/V Synchronization Issues within Broadcast Environments|journal=SMPTE Motion Imaging Journal|date=July 2011|volume=120|issue=5|pages=36–46|doi=10.5594/j18059XY|quote=Appropriate A/V sync limits have been established and the range that is considered acceptable for film is +/- 22 ms. The range for video, according to the ATSC, is up to 15 ms lead time and about 45 ms lag time|display-authors=etal}}</ref>
Real-time bidirectional [[G.114|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]], but this is not an accurate classification.<ref name="Stankovic1988">{{Citation |title=Misconceptions about real-time computing: a serious problem for next-generation systems |first=John |last=Stankovic |year=1988 |periodical=Computer |volume=21 |issue=10 |publisher=IEEE Computer Society |doi=10.1109/2.7053 |page=11|s2cid=13884580 }}</ref> For example, a massive [[supercomputer]] 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]]s. In a real-time system, such as the [[FTSE 100 Index]], 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 [[Computer chess|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.
== {{Anchor|Near real-time}}Near real-time ==
The term "near real-time" or "nearly real-time" (NRT), in [[
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.<ref name=1037C /> 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
==Design methods==
Several methods exist to aid the design of real-time systems, an example of which is [[Modular Approach to Software Construction Operation and Test|MASCOT]], an old but very successful method
==See also==
Line 107 ⟶ 106:
==References==
{{Reflist
==Further reading==
Line 116 ⟶ 115:
==External links==
* [
* [http://www.ecrts.org Euromicro Technical Committee on Real-time Systems]
* [https://web.archive.org/web/20121128161655/http://www.opal-rt.com/technical-document/what-where-and-why-real-time-simulation The What, Where and Why of Real-Time Simulation]
* {{cite web |last1=Johnstone |first1=R.L. |title=RTOS—Extending OS/360 for real time spaceflight control |url=http://bitsavers.trailing-edge.com/pdf/ibm/360/nasa_rtos/RTOS_AFIPS_1969.pdf |website=Bitsavers |access-date=February 24, 2023}}
*{{cite journal |last1=Coyle |first1=R. J. |last2=Stewart |first2=J. K. |date=September 1963 |title=Design of a Real-time Programming System |journal=Computers and Automation |volume=XII |issue=9 |pages=26–34 |url=https://archive.org/details/bitsavers_computersA_7555012/page/n25?q=%22DESIGN+OF+A+REAL-TIME+PROGRAMMING+SYSTEM%22 |publisher=Datatrol Corporation |place=Silver Spring, Maryland |quote=[...] set of notes which will hopefully point up problem areas which should be considered in real time design.}}
{{Computer science}}
{{DEFAULTSORT:Real-Time Computing}}
[[Category:Real-time computing| ]]
|