Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

What is the most appropriate definition of a Real time system?

Is online railway reservation a real time system ? Is Aircraft control system a real time system? Is Process control system a real time system?

share|improve this question

migrated from stackoverflow.com Jul 4 '11 at 14:04

This question came from our site for professional and enthusiast programmers.

    
I remember Einstein's definition of time and relativity. I think the best definition for real-time system is a system in which, a cause in one place at the same time effects another thing in the system (in one spatio-temporal system or a unique frame of reference). –  Saeed Neamati Jul 3 '11 at 17:41
    
The computers that control the launch of the Shuttle are a RTOS. –  dbasnett Jul 3 '11 at 17:43
2  
You need to distinguish between hard real-time and soft real-time. –  Paul R Jul 3 '11 at 18:12

4 Answers 4

This article may be of some help.

Aircraft control system is definately Realtime. Railway reservation is not.

Hope it helps......

share|improve this answer

A real-time system is one where it has to respond within certain time limits, for example, the avionics of a plane, or the control system of an industrial process.

If the system does not respond in a timely manner, it's potentially dangerous.

If an online railway reservation system is slow to respond, that's annoying; if a system controlling a train is slow to respond, that's bad.

share|improve this answer
1  
Visualization of "bad": youtube.com/watch?v=JM-0Ywc7wNY –  user1249 Jul 4 '11 at 14:10
1  
The actual "time" is not so important as rather certain events have priorities and those priorities have to be honoured exactly. What happens is that if you have this guarantee you'll find that events triggered will have definable response times, rather than being side-tracked by something else in the OS. –  edA-qa mort-ora-y Jul 4 '11 at 15:18

"Real time" is frequently used to indicate very rapid responses.

This is not what is meant in computing. Here it covers that a given piece of functionality is guaranteed to have finished within a certain time. This is important whenever timing is important:

  • Robots: The motors inside needs to be precisely managed for the robot to be in the correct location.
  • Stock trading: Split second timing is important to be able to get the best price.
  • Airplane control: You do not want landing gears to await a garbage collection before they lock in position.

In other words, this is about timing and it is hard to do correctly. For Java Oracle has http://www.oracle.com/technetwork/java/javase/tech/index-jsp-139921.html which is so expensive that the price is not listed on the website.

share|improve this answer
    
+1 I flew my first Cessna last weekend, and did not wait for GC at any point –  Matt Stephenson May 29 '12 at 14:50

Real time in general means there are time constraints.

Hard real time means that you cannot fail to meet those constraints without serious risk of some kind of disaster - often the literal people-die kind of disaster, but often also financial disasters, mission-failure etc.

Soft real time includes things where, if you fail to meet those time constraints, it's anywhere from annoying to maybe incurring some minor costs. Most games are soft real-time.

Developing hard real time in particular often places constraints on the hardware as well as the software. For example, no matter how fast your algorithm, if a failed hard disk could mean someone dies you'll need a RAID setup at a minimum.

Real time doesn't necessarily mean real fast. For example, "once per hour without fail" is a real-time constraint, and may be sufficient to e.g. force you to use a balanced tree based index rather than a simple linear search of a large data table. You'd probably do something like that anyway, but the hard real-time constraint makes it unavoidable.

In soft real time, though, real fast is very often (but not always) good enough. Most games are soft real time in this sense - you need a good frame rate to be playable, but the world doesn't end if some people can't get 100 frames per second, and an occasional skipped frame may not even be noticed. The worst that can happen is some interested potential customers don't buy, or buy then return.

share|improve this answer
1  
+1 for explaing hard vs. soft realtime –  user281377 Jul 4 '11 at 17:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.