Real Time Systems

 

                      Real Time Systems

A real- time system is defined as a system in which the correctness of computations depends not only on the logical correctness of the computation but also on the time at which the result is produced. So, we can say that it has strict time constraints. The inputs, data or outputs should be available within this time period otherwise disasters can happen. Sensors bring data to the computer. The computer must analyze the data and adjust controls to modify the sensor’s inputs. These systems are characterized by having time as a key parameter.

{tocify} $title= {Table of Contents}

Introduction:-

The correctness of many systems and devices in our modern society depends not only on the effects or results they produce but also on the time at which these results are produced. These real-time systems range from the anti-lock braking controller in automobiles to the vital-sign monitor in hospital intensive-care units. For example, when the driver of a car applies the brake, the anti-lock braking controller analyzes the environment in which the controller is embedded (car speed, road surface, direction of travel) and activates the brake with the appropriate frequency within fractions of a second. Both the result (brake activation) and the time at which the result is produced are important in ensuring the safety of the car, its driver, and passengers.

Recently, computer hardware and software are increasingly embedded in a majority of these real-time systems to monitor and control their operations. These computer systems are called embedded systems, real-time computer systems, or simply real-time systems. Unlike conventional, non-real-time computer systems, real-time computer systems are closely coupled with the environment being monitored and controlled. Examples of real-time systems include computerized versions of the braking controller and the vital-sign monitor, the new generation of airplane and spacecraft avionics, the planned Space Station control software, high performance network and telephone switching systems, multimedia tools, virtual reality systems, robotic controllers, battery-powered instruments, wireless communication devices (such as cellular phones and PDAs), astronomical telescopes with adaptive-optics systems, and many safety-critical industrial applications. These embedded systems must satisfy stringent timing and reliability constraints in addition to functional correctness requirements.

Figure below shows a model of a real-time system. A real-time system has a decision component that interacts with the external environment (in which the decision Component is embedded) by taking



 sensor readings and computing control decisions based on sensor readings and stored state information. We can characterize this real time system model with seven components:

1. A sensor vector ¯ x X,

2. A decision vector ¯y Y,

3. A system state vector ¯s S,

4. A set of environmental constraints A,

5. A decision map D, D : S × X → S × Y ,

6. A set of timing constraints T , and

7. A set of integrity constraints I.

In this model, X is the space of sensor input values, Y is the space of decision values, and S is the space of system state values. Let ¯ x(t) denote the value of the

sensor input ¯ x at time t , and so on.

The environmental constraints A are relations over X, Y , S and are assertions about the effect of a control decision on the external world which in turn affect future sensor input values. Environmental constraints are usually imposed by the physical environment in which the real-time decision system functions. The decision map D relates ¯y(t 1), ¯s(t 1) to ¯ x(t ), ¯s(t), that is, given the current system state and sensor input, D determines the next decisions and system state

values. Decision maps can be implemented by computer hardware and software components. A decision system need not be centralized, and may consist of a network of coordinating, distributed monitoring/decision-making components.

The decisions specified by D must conform to a set of integrity (safety) constraints I . Integrity constraints are relations over X, S, Y and are assertions that the decision map D must satisfy to ensure safe operation of the physical system under control. The implementation of the decision map D is subject to a set of timing constraints T , which are assertions about how fast the map D has to be performed. In addition, timing constraints exist on the environment (external to the decision system) that must be satisfied for the correct functioning of this environment.

There are two ways to ensure system safety and reliability. One way is to employ engineering (both software and hardware) techniques, such as structured programming principles, to minimize implementation errors and then utilize testing techniques to uncover errors in the implementation. The other way is to use formal analysis and verification techniques to ensure that the implemented system satisfy the required safety constraints under all conditions given a set of assumptions. In a realtime system, we need to not only satisfy stringent timing requirements but also guard against an imperfect execution environment, which may violate pre-runtime design assumptions. The first approach can only increase the confidence level we have on the correctness of the system because testing cannot guarantee that the system is error-free [Dahl, Dijkstra, and Hoare, 1972]. The second approach can guarantee that a verified system always satisfies the checked safety properties, and is the focus of this text.

However, state-of-the-art techniques, which have been demonstrated in pedagogic systems, are often difficult to understand and to apply to realistic systems. Furthermore, it is often difficult to determine how practical a proposed technique is from the large number of mathematical notations used. The objective of this book is to provide a more readable introduction to formal techniques that are practical for actual use. These theoretical foundations are followed by practical exercises in employing these advanced techniques to build, analyze, and verify different modules of real-time systems. Available specification analysis and verification tools are also described to help design and analyze real-time systems.


Real time systems span several domain of computer science. The term “real-time system” refers to any information processing system with hardware and
software components that perform real-time application functions and can respond to events
within predictable and specific time constraints. Common examples of real-time systems include air
traffic control systems, process control systems, and autonomous driving systems.

Real-Time systems are those which must produce correct responses within a
definite time limit. Should computer responses exceed these time bounds then
performance degradation and/or malfunction results.

 Real-time operating systems (RTOS) are used in environments where a large number of events, mostly external to the computer system, must be accepted and processed in a short time or within certain deadlines. such applications are industrial control, telephone switching equipment, flight control, and real-time simulations.  With an RTOS, the processing time is measured in tenths of seconds. This system is time-bound and has a fixed deadline. The processing in this type of system must occur within the specified constraints. Otherwise, This will lead to system failure.

Examples of the real-time operating systems: Airline traffic control systems, Command Control Systems, Airlines reservation system, Heart Peacemaker, Network Multimedia Systems, and Robot etc.

Types of Real Time Operating Systems

The real-time operating systems can be of 3 types – 



1.     Hard Real-Time operating system: 

 Actions are not necessarily disjoint in time, and the sequence of some of program

an action is not determined by the designer but the environment (by events occurring in the outside world which occur in real-time and without reference to the internal operations of the computer). Another important characteristic in real-time systems is their ability to perform concurrent execution of real-time and non-real-time workloads in order to avoid critical system failure.

Finally, it’s important to understand how real-time systems are typically categorized. They are designated as either a soft real-time system or a hard real-time system based on timing constraints.
These operating systems guarantee that critical tasks be completed within a range of time. 

For example, a robot is hired to weld a car body. If the robot welds too early or too late, the car cannot be sold, so it is a hard real-time system that requires complete car welding by robot hardly on the time. 
 A Hard real-time is when a system will cease to function if a deadline is missed, which can result in catastrophic consequences. As in hard real time systems, the scheduler plays an important roe in soft real time systems also. A carefull design of scheduler is required. It must handle priority scheduling and the dispatch latency must be small. In hard real time systems, late data is bad data. For example, in industrial process- control systems, real time computers have to collect data about production process and use it to control machines in the factory. Often there are hard deadlines that must be met. For example, if a car is moving down an assembly line, certain actions must take place at certain instants of time. If for example, a wielding robot weilds too early or too late, the car will be reined. If the action occur at a certain moment (or within a certain range). Many of these are found in industrial process control, avionics, military, and similar application areas. These systems must provide absolute guarantees that a certain action will occur by a certain time.

However, there are certain industries, such as robotics, automotive, utilities, and healthcare, where use cases have higher requirements for synchronization, time lines, and worst-case execution time guarantee. Those examples fall within the hard real-time classification. Since meeting deadlines is crucial in (hard) real time systems, sometimes the operating system is simply a library linked in with the application programs, with everything tightly coupled and no protection between parts of the system. As example of this type of real-time system is eCos.

   Soft real-time operating system: 


This operating system provides some relaxation in the time limit. 

For example – Multimedia systems, digital audio systems etc. Explicit, programmer-defined and controlled processes are encountered in real-time systems. A separate process is changed with handling a single external event. The process is activated upon occurrence of the related event signaled by an interrupt.

A Soft real-time is when a system continues to function even if it’s unable to execute within an allotted time. If the system has missed its deadline, it will not result in critical consequences. The system can continue to function, though with undesirable lower quality of output. In this critical task are given priority over noncritical task. Delays need to be bounded (i.e., Predictable) so the critical tasks do not wait forever but these bounds are not as serve as in hard systems. In soft real time systems, late data is good data. It is one where missing an occasional deadline, while not desirable, is acceptable and does not cause any permanent damage. Digital audio, multimedia systems and smart phones are also soft real time systems. 

Multitasking operation is accomplished by scheduling processes for execution independently of each other. Each process is assigned a certain level of priority that corresponds to the relative importance of the event that it services. The processor is allocated to the highest priority processes. This type of schedule, called, priority-based preemptive scheduling is used by real-time systems.

      Firm Real-time Operating System:

RTOS of this type have to follow deadlines as well. In spite of its small impact, missing a deadline can have unintended consequences, including a reduction in the quality of the product. Example: Multimedia applications. A Firm real time system is a combination of both hard and soft timeliness requirements. The computation has a shorter soft requirement and a longer hard requirement.

For Example: a patient ventilator must mechanically ventilate the patient a certain amount in a given time periods. A few seconds delay in the initiation of the breath in allowed but not more than that.  

Soft Real-Time Systems vs. Hard Real-Time Systems:-

The concept of real-time can be applied to a variety of use cases. The majority of those use cases, such as web browsing and gaming, fall within the soft real-time classification. 

 

Hard Real Time Systems

Soft Real Time Systems

1. Autonomous error detection for hard real time systems.

2. These systems have limited utility for rollback/ recovery mechanism due to short-term integer of data.

3. The data file sizes are small/medium.

4. Their safety is often critical.

 

5. Predictable (well defined) peak load performance for these systems.

Examples:

(a) Air Traffic Control.

(b) An Embedded System controlling the operation of a refinery.

1. User assisted error detection for soft real time systems.

2. These systems have long-term integrity of data.

 

 

3. The data file sizes are large.

4. Their safety is non –critical.

 

5. Degraded peak load performance.

Examples:

(a) Telecom (Voice)

(b) Delayed information about fight path will lose its utility. It is a soft system as it will not be catastrophic but the output loses its utility.



Advantages:

The advantages of real-time operating systems are as follows- 

1.      Maximum consumption 
Maximum utilization of devices and systems. Thus more output from all the resources. 
 

2.      Task Shifting – 
Time assigned for shifting tasks in these systems is very less. For example, in older systems, it takes about 10 microseconds. Shifting one task to another and in the latest systems, it takes 3 microseconds. 
 

3.      Focus On Application – 
Focus on running applications and less importance to applications that are in the queue. 
 

4.      Real-Time Operating System in Embedded System – 
Since the size of programs is small, RTOS can also be embedded systems like in transport and others. 
 

5.      Error Free – 
These types of systems are error-free. 
 

6.      Memory Allocation – 
Memory allocation is best managed in these types of systems.

Disadvantages: 

The disadvantages of real-time operating systems are as follows- 
 

1.      Limited Tasks – 

Very few tasks run simultaneously, and their concentration is very less on few applications to avoid errors. 
 

2.      Use Heavy System Resources – 

Sometimes the system resources are not so good and they are expensive as well. 
 

3.      Complex Algorithms – 

The algorithms are very complex and difficult for the designer to write on. 
 

4.      Device Driver And Interrupt signals – 

It needs specific device drivers and interrupts signals to respond earliest to interrupts. 
 

5.      Thread Priority – 

It is not good to set thread priority as these systems are very less prone to switching tasks.
 

6.      Minimum Switching – 

 RTOS performs minimal task switching.

 

Real-Time Program:

 “A program for which the correctness of operation depends both on the logical

results of the computation and at which the results are produced” 

Note: All real time systems are distributed systems but all distributed systems are not real systems.  

Real-time systems are defined as those systems in which the correctness of the system depends not only on the logical result of computation but also on the time at which the results are produced. The journal Real-Time Systems publishes papers that concentrate on real-time computing principles and applications. Real-Time Systems publishes research papers invited papers project reports and case studies standards and corresponding proposals for general discussion and a partitioned tutorial on real-time systems as a continuing series. Much of the work in building sophisticated modern real-time systems is interdisciplinary in nature and up until now has been found scattered throughout the primary literature. Real-Time Systems provides a single-source coverage of the state of the art in this exciting and expanding field. The editorial board the writers and the readers of the journal are drawn from all parts of the world from industry and from academe. Papers published in Real-Time Systems cover the following topics among others: requirements engineering specification and verification techniques design methods and tools programming languages operating systems scheduling algorithms architecture and hardware (especially interfacing) fault tolerance distributed and other novel architectures communications distributed databases AI expert systems and application case studies. Applications are found in command and control systems process control systems automated manufacturing flight control avionics space avionics and defense systems shipborne systems vision and robotics and robot teams in hazardous environments. 

The Need for Real-Time Systems

Growing global connectivity, changing consumer demands for always-available data, and always-on, sensor-enabled enterprise environments are driving the creation, collection, and analysis of exponential amounts of data. By 2025, IDC estimates that there will be 79.4 zettabytes of data created and nearly 30 percent  of it will require real-time processing enabled by real-time systems.

The need for real-time processing is especially crucial for businesses in robotics, manufacturing, healthcare, and high-precision industries, such as oil and gas and power, that rely on real-time data for continuous improvement in safety, efficiency, and reliability.

One key factor in ensuring data is processed in real-time for businesses in these types of industries is a system’s ability to prioritize, manage, and execute real-time workloads over non-real-time workloads.

For example, modern automotive manufacturers are highly reliant on robots to work together on a production line to assemble a car. The robots will pass each other parts, drill or weld, or perform safety inspections—all of which require a high level of precision and meticulous timing. In this use case, a real-time system must have the ability to not only process data in a defined, predictable time frame but also ensure that critical tasks, such as safety-related workloads, are completed prior to less critical task.

Benefits of Real-Time Systems for Applications

Real-time systems offer several benefits:

Real-Time System Components 

For a real-time system to be capable of real-time computing, it must satisfy two requirements:

  • Timeliness: The ability to produce the expected result by a specific deadline.
  • Time synchronization: The capability of agents to coordinate independent clocks and operate together in unison.
  • Latency: Measurement of time between two events
  • Compute jitter: Latency variation between iterations

When evaluating real-time systems, companies can measure the value of any system in how predictable it is in completing events or tasks. Predictability can be further evaluated by examining the system’s:

Classification Of Real-Time Systems:
RTS are classified based on the tasks into the following three categories:
· Clock- based tasks (cyclic, periodic)
· Event –based tasks(a periodic)
· Interactive systems
Synchronization between the external processes and internal actions (tasks) carried out
by the computer may be defined in terms of the passage of time, or the actual time of
day, in which case the system is said to be “Clock-based system” or it may be defined in
terms of events, and the system is said to be “Event-based system”.
If the relationship between the actions in the computer and the system is much more
loosely defined, then the system is said to be “interactive system”.
· Clock-Based Tasks: (Cyclic and Periodic):
– The completion of the operations within the specified time is dependent on the
number of operations to be performed and the speed of the computer.
– Synchronization is usually obtained by adding a clock to the computer system,
and using a signal from this clock to interrupt the operation of the computer at
predetermined fixed time interval.
· Event-Based Tasks: (A periodic):
– Action are to be performed not at particular times or time intervals but in
response to some event. The system must respond within a given max. Time to a
particular event.
– Events occur at non-deterministic intervals and event-based tasks are referred to
as “a -periodic” task.
· Interactive Systems:
-
They represent the largest class of RTSs such as automatic bank tellers,
reservation systems for hotels, airlines and car rental……etc.
The real-time requirement is usually expressed in terms such as “the average
response time must not exceed some predetermined time”
Example: an automatic bank teller system might require an average response time
not exceeding 20 sec.
- An interactive system responds at a time determined by internal state of the
computer without reference to the external environment.

Classification Based on Timing Constraints: 

Based on timing constraints real-time tasks are classified into two types

· Hard real-time (these are systems that must satisfy the deadlines on each and
every occasion)
· Soft real-time (these are systems for which an occasional failure to meet a
deadline does not comprise the correctness of the system).

Classification Of Programs:

Programs can be broadly classified into the following 3 categories:

· Sequential
· Multi-tasking
· Real-time
Sequential:
- Actions are ordered as a time sequence, the program behaviour depends only on the
effects of the individual actions and their order but not on the time taken to perform
those actions

Multi-tasking:

-Actions are not necessarily disjoint in time, it may be necessary for several actions to be
performed in parallel. Hence in multitasking programs various tasks are executed concurrently and communicate through shared variables and synchronization signals.

Applications of Real-Time Systems

Working of real time Systems

Process Control Systems

Process control systems are used in industrial applications where production is continuous and
interruptions cannot happen. These systems help businesses maintain quality and improve
performance by testing processes, collecting relevant data, and returning that data for monitoring and possible troubleshooting. Companies in the oil and gas sector are key users of process control systems and often realize numerous benefits, from increased efficiency to safer operation of facilities to less downtime and fewer losses.
Machine Vision
Machine vision is used to help machines rapidly interpret data so they can see their surroundings and make decisions quickly based on that visual input. These machines are often key to ensuring production keeps flowing or critical processes continue. Real-time systems help ensure machines such as these are able to process that data in near real-time.
Robotics
Robotics technologies are used for a variety of complex applications, many of which require precise timing constraints to ensure a safe workload execution as well as the ability to continuously function. Real-time systems are a valuable part of robot operating systems because of the need for real-time computing and processing.
Manufacturing
Future-focused manufacturers rely on insights gained from real-time applications to avoid product quality issues, improve efficiency and performance, and, ultimately, gain a competitive edge.
Embedded realtime systems can help manufacturers maximize productivity, improve product quality and consistency, and enhance safety on the factory floor.

Healthcare and Patient Monitoring
How quickly data is processed in healthcare can often mean the difference between life and death. Real-time systems are key to ensuring data from patient monitoring systems, such as heart rate monitors, is available to clinicians when and where they need it to keep patients safe and healthy.

Summary:

The key ideas described in this chapter are:
· A brief history of computer control.
· Digital computers are sequential devices.
· Real-time systems have to carry out both Periodic and a-periodic activities.
· Real-time systems have to satisfy time constraints that can be either a hard or a
soft constraint.
· Real-time software is more difficult to specify, design and construct than non real-time software.

The categories of handhelds, embedded systems and real -time systems overlap considerably. Nearly all of them have some soft real-time aspects. The embedded and real-time systems run only software put in by the system designers, users cannot add their own software, which makes protection easier. The handhelds and embedded systems are intended for consumers, whereas real –time systems are more for industrial usage. Nevertheless , they have a certain amount in common.







 


       




Post a Comment (0)
Previous Post Next Post