Showing posts with label Real Time Database. Show all posts
Showing posts with label Real Time Database. Show all posts

Sunday, March 20, 2016

Real time database - relative consistency

Real time database - Relative consistency, What is relative consistency in real time database, Explain relative consistency with an example

Relative consistency


A set of data items are relatively consistent when their values are updated within a certain time interval, called the relative validity interval (rvi).

A set of data items are relatively consistent if they are temporally correlated to each other. So, a derived data will be correct, only if the data items on which it is derived are relatively consistent with each other, or in other words, a set of data items would be called as relatively consistent, if they are contemporary data item.

Different data items that are used to derive new data must be temporally consistent with each other. This requires that a set of data items used to derive a new data item form a relative consistency set R.

Data item d is temporally consistent if and only if d is absolutely consistent and relatively consistent.

Example:

Assume that sensors are embedded in a car to monitor its fuel efficiency. They read the current fuel level and the distance travelled to derive the fuel efficiency. The car may go faster or slower. Depends on the speed there will be slight variation in the fuel consumption. And this variation may not go abnormal in any cases.

Let us assume that the current fuel level is 30 litres at time 100msec and the distance travelled is 10 kilo meters. Also assume that the avi is 20 msec. These real-time data can be specified as follows;

dfuel (30 litres, 20 msec, 100 msec)
ddistance (10 kms, 20 msec, 110 msec)

We read these two values from two different sensors. So, there will be a difference or delay in data arrival at the controlling system. We have to accept the fact that both data are valid during this time delay. That acceptable time delay is called relative validity interval (rvi). Hence, if rvi is 15 msec for example, then the given data are relatively consistent. This time rvi is the difference between the time at which we read 30 litres and the time at which we read 10 kilo meters.

If the time difference between these two data is not more than the rvi value, then the data are consisdered to be relatively consistent.

 
***********************




Go back to Temporal Consistency page

Go to REAL TIME DATABASE Home page










Real time database - absolute consistency

Real time database - Absolute consistency, What is absolute consistency in real time database, Explain absolute consistency with an example



Absolute consistency


The consistency about the state of the environment (controlled system) and its reflection in the database (controlling systems database) is absolute consistency. This ensures the freshness of the data that is read by a transaction.

A data item obeys absolute consistency when its value is updated within a predefined time interval called Absolute Validity Interval (avi). That is, the value of a data item is absolutely consistent (fresh) if and only if the difference between the time of the observation of data and the current time is not greater than the absolute validity interval value.

Absolute Validity Interval (avi) is the length of the time interval since the time of the observation of data, during which the data is considered to be fresh (not outdated) or to have absolute validity.

Absolute data consistency states that the validity interval of the most recent value of a base (or derived) item is always longer than the time interval between its absolute valid (or absolute transaction) time and “now.” This indicates that the data has absolute validity.

Data is only valid between absolute points in time. This is due to the need to keep the database consistent with the environment.

Example:
Assume that a car is manufactured with a sensor in fuel tank to monitor the availability level of the fuel at any time. Let us also assume that the reading from the sensor can be of maximum 20 msec (absolute validity interval) outdated (old) at any time. That is, if sensor gives us the current fuel level at time 100 msec as 30 litres, then the value 30 litres would be valid for next 20 seconds. The current fuel level becomes outdated (old or obsolete) after 120 msec (the data is valid for 20 msec, ie., from 100 msec to 120 msec). The consistency of the data at this absolute validity interval is called Absolute consistency.

If the sensor reads the fuel level at 100 msec, the fuel reading is 30 litres and if we assume 20 msec as the avi value, then we would represent this data as follows;

d(30 litres, 20 msec, 100msec)

The data 30 litres is valid between 100 msec and 120 msec. 

If suppose the current time is 118 msec, then this is absolutely consistent. If the current time is 121 msec, then the data is not consistent and the data becomes old or archival data.


***************


Go back to Temporal Consistency page

Go to REAL TIME DATABASE Home page










Tuesday, March 15, 2016

Explain temporal consistency in real-time database

Explain temporal consistency, Define temporal consistency, Example for temporal consistency calculation, What is temporal consistency in real-time database



Temporal Consistency


The consistency that needs to be maintained between the actual state of the environment (the controlled system’s state) and the state reflected by the contents of the database (the state perceived by the controlling system) is called as temporal consistency.

Example:

Consider an anti-missile system. The system’s controller maintains accurate information about the state of the missile by missile’s position, and acceleration data. These values change time to time. These changes have to be perceived by the controller as they are. That is, if the actual status of the missile at a point of time (the actual state of the environment) is, current position = 10km, and acceleration = 100 km/h, then the status about the missile as calculated by the controller (the state of the environment as perceived by the controller) should be very close to these values. This consistency requirement is called temporal consistency.

Temporal consistency has two components;








***************





Go to REAL TIME DATABASE Home page







Monday, March 14, 2016

Classification of real-time transactions

Classification of real-time transactions based on effect of not meeting the deadline, How would we classify real-time transactions based on their deadlines? Hard, Soft, and Firm real-time transactions with examples


Classification of Real-time transactions


Real-time transactions can be classified based on the effect caused when not meeting their deadlines. They are;

  • Hard real-time transactions 
    • The real-time transactions that would lead to catastrophic consequences if they are not executed on time is called hard real-time transactions. In this case a large negative value is imparted to the system.
Example: All the safety critical systems
  • Soft real-time transactions 
    • The real-time transactions that would degrade in terms of the system’s performance when not completed within deadline is called as soft real-time transaction. In this case the value drops to zero at a point of time after the deadline.
Example: Telephone switching
  • Firm real-time transactions 
    • The real-time transactions that impart no value to the system once their deadlines expire, i.e., the value drops to zero at the deadline is called as firm real-time transactions. As it does not give any values to the system, it has to be aborted.
Example: Air traffic control

*********************
 


Go to REAL TIME DATABASE Home page








Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents

data recovery