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
1 answer

Are there any C++ libraries for real-time animation of a 3D model using changing x,y coordinates of feature key points

I am working on a project where I am to use the Kinect to track facial expressions and animate a 3D model (.ply) accordingly. So far I have managed to track a human face with a finite number of key-points on the face. I am able to get the…
1
vote
1 answer

Android/Google Analytics SDK : how to make REAL TIME analytics working?

I installed the Google Analytics SDK in my app. I want to be able to have real time analytics (new feature proposed by Google). My code: tracker = GoogleAnalyticsTracker.getInstance(); // the tracker is started with a dispatch interval of 20…
toto_tata
  • 14,526
  • 27
  • 108
  • 198
1
vote
1 answer

Realtime Notification System

I want to implement my own realtime notification system (like facebook - when someone in my friends list comments on/likes my status, I'm notified about that) I just want to know which technologies are best suited for such problem domain. Thanks
TriNitroToluene
  • 319
  • 4
  • 9
1
vote
1 answer

How to change a DirectShow renderer's buffer size if it's input pin doesn't support IAMBufferNegotiation?

I have a DirectShow application written in Delphi 6. I want to reduce the buffer size of the Renderer from its current 500 ms value to something smaller. The problem is, its input pin does not support IAMBufferNegotiation, which is odd since the…
Robert Oschler
  • 14,153
  • 18
  • 94
  • 227
1
vote
1 answer

How to Convert TimeStamps to Ticks (PPQ) - Real Time Midi

I'm currently reading in MIDI messages in real-time from my midi keyboard using a class that implements Receiver, and outputting the notes played. The only information i receive when I press a note is the MidiMessage and a timeStamp. I am trying to…
Devan Somaia
  • 645
  • 1
  • 8
  • 21
1
vote
2 answers

How can I efficiently use MongoDB to create real-time analytics with pivots?

So I'm getting a ton of data continuously that's getting put into a processedData collection. The data looks like: { date: "2011-12-4", time: 2243, gender: { males: 1231, females: 322 }, age: 32 } So I'll get…
Shamoon
  • 41,293
  • 91
  • 306
  • 570
1
vote
1 answer

Can test users be verified? Can they have usernames?

I'm working on an app where I'd like to be able to do things with a user's Facebook username. I know that I can get this through the basic user object, but I'm worried about the case where the user doesn't have a FB username when they register with…
Jim Miller
  • 3,291
  • 4
  • 39
  • 57
1
vote
0 answers

Real Time Updates using Windows Communication Foundation

I'm trying to implement Real Time Updates by using Windows Communication Foundation and REST; I've successfully solved one part (see link) So I subscribe to the events that I want, but don't get ANY notification. This is what I have in my server,…
1
vote
2 answers

How can I change in real-time filtered words in tweetstream (Python)?

I need to save in real-time to a database all tweets from the Twitter Streaming API, filtering them by out a certain list of words, of course. I've achieved it by using tweetstream, defining the list words like this before calling…
user708517
1
vote
3 answers

Is relational database appropriate for soft real-time system?

I'm working on a real-time video analysis system which processes the video stream frame by frame. At each frame it can generate several events which should be recorded and some delivered to another system via network. The system is soft real-time,…
ansgri
  • 2,126
  • 5
  • 25
  • 37
1
vote
1 answer

IIS and MS Exchange Realtime Log

How can I get IIS and MS Exchange logs in realtime? Is there a similar way like viewing EventLog by MS Visual C++ functions, classes (ex. NotifyChangeEventLog)?
abbas sebastian
  • 105
  • 5
  • 14
1
vote
1 answer

creating a web url that listens to redis pubsub published message

Edit OK I have a long polling from javascript that talks to a django view. The view looks as follows. It loses some messages that I publish from redis client in the channel. Also I should not be connecting to redis for every request (Perhaps the…
S Ifar
  • 23
  • 4
1
vote
1 answer

django chat application using redis - how/where do I "listen" to messages after subscribing?

So I am trying to write a chat system using django (I am relatively new to real time system). I did some research - there are lots of options (twisted, tornado etc) but for now I decided to to try and use nginx as the web server and redis's pubsub.…
S Seer
  • 71
  • 5
1
vote
0 answers

Is it possible to "wake up" linux kernel process from user space without system call?

I'm trying to modify a kernel module that manages a special hardware. The user space process, performs 2 ioctl() system calls per milliseconds to talk with the module. This doesn't meet my real.time requirements because the 2 syscalls sometimes take…
user991839
  • 11
  • 1
1
vote
0 answers

Dynamically plotting data real time quickly

I currently am trying to plot some data that is being generated realtime from a simulation, this portion of code is a simplified version of what i have right now. It works but it is incredibly slow. Are there any tricks or other methods to speed…
nlin22
  • 11
  • 1