RTDB
RTDB
RTDB
Presented to :
Dr: Lo’ai Tawalbeh
Definition
Real-Time Data Base System can be defined as those
computing systems that are designed to operate in a
timely manner.
It must perform certain actions within specific timing
constrains (producing results while meeting
predefined deadlines)
Real-Time Data Base System can also be defined as
Traditional Databases that uses an extension to give
additional power to yield reliable response.
RTDBS Structure
Typical Real-Time Bata Base System consists of:
Controlled System : the underlying application
Controlling System:
A Computer monitoring the state of the environment
Supplying the environment with the appropriate driving
signals.
The state of the environment as perceived by the
controlling system must be consistent with the actual
state of the environment.
Specifications validity of data
v0
d1 d2 t
Deadlines
Firm-Deadline:
Desirable but not critical (like Soft-Deadline case)
It is not executed after its deadline and no value is
gained by the system from the tasks that miss their
deadlines
Example: anv(t)autopilot system
Firm deadline
v0
d t
Deadlines
Hard-Deadline:
Timely and logically correct execution is considered to
be critical
Missing a hard-deadline can result in catastrophic
consequences
Also known as Safety-Critical
Example: data gathered by a sensor
v(t)
Hard deadline
v0
d t
Design Paradigms
Time-Triggered (TT)
Systems are initiated as predefined instances
Assessments of resource requirements and resource
availability is required
TT architecture can provide predictable behavior due to
its pre-planed execution pattern.
Design Paradigms
Event-Triggered (ET)
Systems are initiated in response to the occurrence of
particular events that are possibly caused by the
environment
The resource-need assessments in ET architecture is
usually probabilistic
ET is not as reliable as TT but provides more flexibility
and ideal for more classes of applications
ET behavior usually is not predictable.
Tasks Periodicity
Prosodic Tasks
Executes at regular intervals of time
Corresponds to TT architecture
Have Hard-Deadlines characterized by their periods
(requires worst-case analysis).
Aperiodic Tasks
Execution time cannot be priori anticipated
Activation of tasks is random event caused by a trigger
Corresponds to ET architecture
Have Soft-Deadlines (no worst-case analysis)
Tasks Periodicity
Sporadic Tasks
Tasks which are aperiodic in nature, but have Hard-
Deadlines
Used to handle emergency conditions or exceptional
situations
Worst-case calculations is done using Schedulability-
Constraint
Schedulability-Constraint defines a minimum period
between any two sporadic events from the same
source.
Scheduling
Each task within a real-time system has
Deadline
An arrival time
Possibly an estimated worst-case execution
A Scheduler can be defined as an algorithm or policy
for ordering the execution of the outstanding process
Scheduler maybe:
Preemptive
Can arbitrarily suspend and resume the execution of the task
without affecting its behavior
Scheduling (Cont)
Non-preemptive
A task must be rum without interruption until completion
Hybrid
Preemptive scheduler, but preemption is only allowed at
certain points within the code of each task.
Real-Time scheduling algorithms can be :
Static
Known as fixed-priority where priorities are computed off-line
Requires complete priori knowledge of the real-time environment
in which is deployed
Inflexible: scheme is workable only if all the tasks are effectively
periodic.
Can work only for simple systems, performs inconsistently as the
load increases.
Scheduling (Cont)
Dynamic
Assumes unpredictable task-arrival times
task
Decisions are based on task characteristics and the current
Deadlocks
Admission Control
Memory Management
I/O and Disk Scheduling
Conventional Databases:
Transactions and Serializability
Transaction: is a collection of read and write
operations which comprises a consistent
transformation of the system state.
When executed alone, each transaction transforms a
consistent state into a new consistent state
Transactions preserve consistency of the database
information
Schedule: a particular sequencing of the actions from
different transactions.
Consistent Schedule: a schedule that gives each
transaction a consistent view of the database-state.
Conventional Databases:
Transactions and Serializability
Database inconsistencies can be caused by:
Failures
Concurrency
Four properties associated with transactions known as
ACID properties are used to prevent such problems
Conventional Databases:
ACID Properties
A Atomicity: Either all or none of the transactions operations are/is
performed. All the operations of a transaction are treated as a
single, indivisible, atomic unit.
Real-time databases
Data centric
Data has temporal validity, i.e., deadlines also attached to
data
Transactions must be executed by deadline to keep the data
valid, in addition to produce results in a timely manner
A Real-Time Database Model
• Scheduler:
• Drop transaction (firm/soft)
• Replace transaction with contingency action (hard)
• Postpone transaction execution (soft)
Scheduling RTDB Transactions
Memory Management
Memory management is concerned with three types
of decisions:
transaction admission
buffer allocation
buffer replacement
Future Research Areas in RTDBS
Resource management and scheduling
Recovery
Concurrency Control
Fault tolerance and security models to interact with RTDBS
Query languages for explicit specification of real-time
constraints -> RT-SQL
Distributed real-time databases
Data models to support complex multimedia objects
Schemes to process a mixture of hard, soft, and firm timing
constraints and complex transaction structures
Support for more active features in real-time context
Interaction with legacy systems (conventional databases)
References
http://en.wikipedia.org/wiki/Real_time_database
Real-Time Database Systems and Data Services:
Issues and Challenges, Sang H. Son ,Department of
Computer Science, University of Virginia
Real-Time Database Systems: Concepts and Design,
Saud A. Aldarmi Department of Computer
Science,The University of York