Real Time
BY – ER. SURAJ AWAL
Software
Design
Real Time System
A real time system is any information processing system
which must respond to externally generated input stimuli
within a finite and specified period.
Correctness of the result depends on both logic and the
time it was delivered.
Failure to respond timely is as bad as the wrong
response.
Time constraint is the most crucial part of the system
design.
Hard Real Time System
The real time system in which overrun in response time
lead to catastrophic damage.
It must not miss its deadline by any means.
A cost function is associated with the system, which is
expensive if the overrun.
Soft Real Time System
The real time system in which overrun in response time is
tolerable but not desired.
No catastrophic consequences on missing one or more
deadlines.
There is a cost associated to overrunning, but the cost
may be abstract.
Hard Vs. Soft Real Time System
Characteristics Hard RTS Soft RTS
Response Time Exact Tolerable
Peak Load Performance Predictable Degraded
Control of Pace Environment Computer
Safety Critical Non-critical
Size of Data Files Small / Medium Large
Redundancy Type Active Checkpoint recovery
Data Integrity Short term Long term
Error Detection Autonomous User assisted
Considerations for RTS Design
Proper identification of stimulus and expected response
Identification of timing constraints for each stimulus and its response
Identification of possibility of concurrent processing of stimulus
Algorithm design for each process meeting the timing constraints
Efficient scheduling system design
Proper integration using Real time operating system
Role of RTOS
Real time clock (Provides information to schedule processes
periodically)
Interrupt handler (Manages aperiodic requests for service)
Scheduler (Chooses next process which is to be run)
Resource manager (Allocate memory and resources for scheduled
process)
Dispatcher (Starts execution of a process)
Responsible Manager (Dynamic reconfiguration of RTS)
Fault Manager (Detect faults and take appropriate actions)
RTOS Vs. Non-RTOS
RTOS is a system software that manages all the system
resources and provides services to all programs running
in the system along with performing certain functions
within a specified time constraint.
In case of non RTOS, it only performs management and
resource services.
RTOS Vs. Non-RTOS
Characteristics RTOS Non RTOS
Deterministic Nature The time required to The time required for any
execute the services is service may not be fixed.
fixed.
Task Scheduling It uses priority based It uses scheduling to
preemptive scheduling. achieve high
High priority process will throughput. High priority
override low priority process may also be
process. delayed.
Time Critical System It is time critical. Delay in It is non time critical.
processing may result in
undesirable
consequences.
RTOS Vs. Non-RTOS
Characteristics RTOS Non RTOS
Preemptive Kernel Kernel is preemptive. The Kernel is non preemptive.
high priority process can
preempt a kernel call.
Priority Inversion Problem It is seen in RTOS. It does not matter in non
RTOS.
Data Acquisition System
Data Acquisition system is a real time system that samples
signals that measure real world physical conditions and
converts the resulting samples into digital numeric values that
can be manipulated by the computer.
It consists of following components:
1. Sensors (converts physical parameter to electric signal)
2. Signal conditioning circuit (Convert sensor signal into a form
that can be converted to digital values)
3. ADC (Convert conditioned sensor signals to digital values)
Considerations for DAS
Must acquire necessary data at correct time.
Must monitor complete operations for safety.
Must collect, summarize and store data.
Must be capable to scale based on requirements in
future.
Must be able to compute performance indices using
real time data.
Must be reliable, easy to use and must be user friendly.
Block
Diagram
of DAS
Block Diagram of DAS
Physical system is the input to DAS that measures some
environmental conditions.
Transducer is the component that converts the physical
conditions into electrical waveform for easy signal
processing.
Signal conditioning improve the quality of the signal
generated by transducer. It involves amplification, noise
removal, attenuation and so on.
ADC converts analog signal into digital information.
Advantages of DAS
Reduced data redundancy
Increase in data consistency
Improved data access to users
Improved data security
Reduced data entry, storage and retrieval cost
Disadvantages of DAS
Database systems are complex to design
Expensive initial cost
Fault in database affects entire system
Thank You !