System classification

Real-time system: software system where the correct functioning of the system depends on the results produced by the system AND the time at which these results are produced.

Soft real-time system: system whose operation is degraded if results are not produced according to the specified timing constraints - better later results than no results

Hard real-time system: is a system whose operation is incorrect if results are not produced according to the timing specification - if result are too late system is garbage. Example: auto braking system

Monitoring systems: act when exceptional sensor values are detected - Monitoring always, control only in exceptional cases.

Control systems: continuously control hardware actuators depending on value of associated sensor - Control always.

Fault-Error-Failure Chain

Fault: defect in a system, may or may not lead to a failure - bug in system

Error: occurs at runtime when some part of the system enters unexpected state due to activation of fault - bug occurs, then exception thrown or system crash or something else

Failure: instance in time when system shows behaviour contrary to its specification - does system work correctly after an error?

Fail-Safe State

Fail-safe state is a system state where there is no likelihood of danger - “do nothing after detecting a fault to minimize damage”.

A fail safe state of a system is one which if entered when the system fails, no damage would result. All traditional non real time systems do have one or more fail safe states.

Real-Time Patterns

Channel

A channel can be thought of as a pipe (Pipe and Filter Pattern) that sequentially transforms data from an input value to an output value.

Multiple channels to improve quality

Patterns without Fail-Safe State

Homogeneous Redundancy: Switch to Backup. Two channels (main and backup) connected to separate sensors and actuators. Automatically switches over in case of fault. Different instances of the same implementation (Two similar systems with equal output).