Questions tagged [real-time]

A task is real-time when the timeliness of the activities' completion is a functional requirement and correctness condition, rather than merely a performance metric. A real-time system is one where some (though perhaps not all) of the tasks are real-time tasks. DO NOT USE THIS TAG if all you mean is 'real-world'.

Definition

A task is real-time when the timeliness of the activities' completion is a functional requirement and correctness condition, rather than merely a performance metric. A real-time system is one where some (though perhaps not all) of the tasks are real-time tasks.

Real-time Systems

The term real-time is used in at least two distinct ways when referring to computer systems:

  • In the academic sense of real-time, a program or system is "real-time" when it is subject to execution time constraints, such as deadlines. Such systems are broken down into soft and hard real-time. Correctness of an implementation depends not only on the values produced by the program, but on the time at which those values are produced.

    • Hard real-time systems are those in which no deviation from the time constraints (e.g., missed deadlines) are tolerable, and any failure constitutes a complete failure of the system.
    • Soft real-time systems tolerate some degree of deviation from the time constraints, for example media streaming systems, in which some late packets may degrade the quality transiently, but still produce an acceptable execution.
  • As a synonym for "on-line", wherein the program must respond to events "in real-time", whether or not there is an actual time constraint involved. (e.g., real-time stock quotes or whatever.)

Wikipedia has a useful discussion.

Determinism

Some contributors, particularly in the defense and aerospace community, use terms like time-critical or dynamic time-critical instead, to denote systems that have real time constraints. The term real-time is sometimes problematic because it implies determinism (which is not always required or even desired) and it also has the baggage of some very specific theory and implementation history. Nevertheless, there exist highly dynamic systems which nevertheless have time constraints, and a great deal of engineering time is spent using a combination of hard and soft real-time approaches and custom hacks to meet those requirements.

If I have a system with well-defined tasks, and I want to say that task X must complete by time t with probability 0.95, is that a hard or a soft real-time task?

Composition of Tasks

Note that many real-time systems are composite, consisting of tasks and activities requiring varying degrees of timeliness predictability.

Foundations

Here are some foundational questions on StackOverflow and other resources to help understand the concepts of real-time:

Resource Management

Ensuring that activities in a real-time system typically rests in characterizing the activities' resource demands and then managing resources to satisfy them.

Characterization of resource demands usually includes at least an execution time analysis. A common measure is Worst Case Execution Time (WCET), typically given by a combination of empirical data and analysis. In addition, it is often necessary to capture other resource demands like I/O or "logical" resources like locks/mutexes/semaphores. A common metric in this dimension is blocking factor.

Once the activities have been characterized, explicit disciplines are employed to ensure timeliness. Historically, this has been done entirely manually, for instance by employing a cyclic executive design pattern. If the system is constructed atop a multi-process or multi-threaded platform, scheduling and synchronization disciplines must be used. The most common type of scheduler in RTOS is a priority scheduler, in which ready activities receive CPU time in order of their expressed priority. While most real-time activities' time constraints are articulated in terms of deadlines, few or no RTOS provide an explicit deadline scheduler. Instead, periodic or sporadic activities with deterministic deadlines are assigned priorities using Rate Monotonic Analysis (RMA) to map them onto fixed priorities.

Standards

Implementation / Platforms

This section will summarize language, operating systems, middleware, and other implementation components common in RT systems.

Examples

FAQs

4560 questions
1
vote
3 answers

C# Charting - Reasonble Large Data Set and Real-time

I'm looking for a C# WinForms charting component, either commercial or open source, that can handle relatively large data sets and be reasonable scalable with regards to chart rendering and updates. The number of data sets to be displayed would be…
Suggan Buggan
1
vote
1 answer

irregular shaped gradiant contour in Flash

I am looking for a way to get a similar effect as posted in the Adobe forums The current solution is very brute force using about 60 intermediate shapes gradually going from the outer shape towards the inner shape while slightly changing the color…
Godfather
  • 1,089
  • 9
  • 21
1
vote
3 answers

How do I create a real-time rendering window from scratch?

I've been studying 3D graphics on my own for a while now and I want to get a greater understanding of just how everything works. What I would like to do is to create a simple game without using DirectX or OpenGL. I understand most of the math I…
1
vote
1 answer

LabVIEW Real-Time Timed Loop resolution

we are using LabVIEW Real-Time with the PXI-8110 Controller. I am facing the following problem: I have a loop with 500µs period time (time-loop) and no other task. I write the time each loop iteration into ram and then save the data afterwords. It…
steffenmauch
  • 353
  • 5
  • 16
1
vote
0 answers

audio streaming lag with html5?

I'm trying to stream audio (just a simple, uncompressed 8-bit mono wav stream at the moment) to an HTML5-capable browser from node.js - however, the browser seems to be adding several seconds of lag. Is there a way to make this more realtime? I've…
thejh
  • 44,854
  • 16
  • 96
  • 107
1
vote
1 answer

Special polygonial for loop in two dimensional array

This is a bit tricky question for you computer scientists. Let's say that I have a two dimensional array/matrix of 100 by 100 entries, arr[i][j]. Where i and j goes from 0-99. This can be envisioned as a square of dots with each dot corresponding to…
Nicke
  • 133
  • 12
1
vote
4 answers

Simplifying algorithm testing for researchers.

I work in a group that does a large mix of research development and full shipping code. Half the time I develop processes that run on our real time system ( somewhere between soft real-time & hard real-time, medium real-time? ) The other half I…
Brian Gianforcaro
  • 26,564
  • 11
  • 58
  • 77
1
vote
2 answers

Querying real time data from an SQL database sudden latency problem

We are testing an application that is supposed to display real time data for multiple users on a 1 second basis. New data of 128 rows is inserted each one second by the server application into an SQL datatbase then it has to be queried by all users…
mustafabar
  • 2,317
  • 6
  • 31
  • 47
1
vote
1 answer

How to enable realtime search in Solr 4.0

I’m trying to enable realtime search in Solr 4.0 (So I can see new documents without committing). I’ve added: true But documents aren’t seen before commit (or softCommit). Any help will be…
Avner Levy
  • 6,601
  • 9
  • 53
  • 92
1
vote
1 answer

realtime data passed to callback is for wrong user

Realtime updates are kicking my ass! I have my entire fb app working except for this one area and I'm just not sure what I'm doing wrong. My app is approved using these permissions: "scope" =>…
ppetree
  • 826
  • 3
  • 15
  • 31
1
vote
1 answer

Server-Client Syncing

I've been looking up on google for this answer, and I just can't find the answer to my question. I have a 2D rpg that I want to build a client-server architecture with. How do I 'sync' things? cause with lag, things are all 'back in time' by the…
will
  • 1,397
  • 5
  • 23
  • 44
1
vote
2 answers

Real-time sales counter like Humble Bundle?

I'm looking for a real-time counter that updates as more database entries (sales) are created (for example, http://www.humblebundle.com). I'm trying not to put unnecessary strain on the database. A naive way to do this would just be to ping the…
Eric Yang
  • 1,881
  • 1
  • 18
  • 23
1
vote
1 answer

Queuing/event communication between threads of realtime audio/graphics Linux app in C

I need some advice about what kind of IPC and what kind of message queue types might be the best kind to use for my specific circumstances (producers/consumers, priority & timing etc). I'm working on a realtime audio/graphics app in C for Linux…
textchimp
  • 11
  • 2
1
vote
0 answers

Exception handling with messaging

I have a system that receives MSMQ messages and performs (close to) real-time analysis using NEsper. It is possible that some messages come late and perhaps in different order. This situation shall be flagged up and reported. Write not this is how…
oleksii
  • 35,458
  • 16
  • 93
  • 163
1
vote
2 answers

Need help to choose real-time OS and Hardware

I heard and read that Windows/Linux OS machines are not real-time. I have read this article. It listed WindowsCE is one of RTOS. That's kind of confusing to me since I always thought WindowsCE is for a mobile or embeded device. I need a real-time…
Tae-Sung Shin
  • 20,215
  • 33
  • 138
  • 240