Unit-1: Real Time Systems(RTS)
A real-time system means that the system is subjected to real-time, i.e., the response
should be guaranteed within a specified timing constraint or the system should meet the
specified deadline.
For example flight control systems, real-time monitors, etc.
• Types of real-time systems based on timing constraints
• Hard real-time system-system can never miss its deadline
• Soft real-time system- system can miss its deadline occasionally with some
acceptably low probability
• Firm Real-Time Systems- systems that lie between hard and soft real-time systems
• Terms related to real-time system
• Job
• Task
• Release time of a job
• Execution time of a job
• Deadline of a job
Characteristics of Real-time Systems
• Time Constraints
• Correctness
• Embedded
• Safety
• Concurrency
• Distributed
• Fault tolerance
• Determinism
• Real-time communication
• Resource management
• Heterogeneous environment
• Scalability
• Security
• Advantages
• Real-time systems provide immediate and accurate responses to external events
• They can automate complex tasks
• Real-time systems can reduce human error by automating tasks that require
precision, accuracy, and consistency
• They can help to reduce costs by minimizing the need for human intervention and
reducing the risk of errors
• Real-time systems can be customized to meet specific requirements, making them
ideal for a wide range of applications.
• Disadvantages
• Real-time systems can be complex and difficult to design
• They can be expensive to develop, as they require specialized hardware and
software components.
• they must be continually monitored and maintained to ensure they operate
correctly.
• Tasks in Real Time systems
System response should be guaranteed within a specified timing
constraint or system should meet the specified deadline.
For example flight control systems, real-time monitors, etc.
• There are two types of tasks in real-time systems
• Periodic tasks - jobs are released at regular intervals.
• Dynamic tasks - Aperiodic tasks
Sporadic tasks
• Periodic tasks – it follows fixed intervels
• A periodic task is denoted by four tuples: Ti = < Φi, Pi, ei, Di >
Where
Φi – is the phase of the task or Release time of the task.
Pi – is the period of the task.
ei – is the execution time of the task.
Di – is the relative deadline of the task.
• For example: Consider the task Ti with period = 5 and execution time = 3
• Dynamic Tasks –
• Sporadic Tasks –
• They are similar to aperiodic tasks i.e. they repeat at random instances.
• The only difference is that sporadic tasks have hard deadlines.
• A sporadic task is denoted by three tuples: Ti =(ei, gi, Di)
Where
ei – the execution time of the task.
gi – the minimum separation between the occurrence of two consecutive instances of the task.
Di – the relative deadline of the task.
• Aperiodic Tasks –
• In this type of task, jobs are released at arbitrary time intervals i.e. randomly
• Aperiodic tasks have soft deadlines or no deadlines.
Applications of Real Time Systems
Digital Control :
This is one of the most important applications of RTS
It involves using computers to monitor and control physical processes such as
• Industrial control systems – temp, pressure, flow rate.. etc
• Power systems – reliable & efficient distribution of power to Homes and businesses
• Traffic control systems – used to monitor traffic flow and adjust traffic signals to optimize
traffic flow and reduce congestion
• Robotics – RTS used to control the movement of robots, enabling them to perform precise
tasks in manufactories and other industries
• Building Automation – RTS used to monitor and control heating, ventilation, and air
conditioning systems in buildings, ensuring the comfortable and safe
environment for occupants
Signal Processing Control:
Where the processing and control of signals or Data must be done in real time
• Digital Signal Processing (DSP) – Audio, video processing & image, speech recognition and data
compression
• Robotics and automation
• Power systems
• Control systems
• Instrumentation
• Release Time
• Deadlines
• Hard deadlines - This Deadlines critical and must be met
• Ex-flight control system, a missed deadline could lead to a plane crash.
• Soft deadlines – This deadlines are less critical
• Ex - in an audio and video processing system, a missed deadline may result in a
momentary glitch in the output, which may be acceptable.
• Comparison between Hard Real Time & Soft Real Time Systems
RTS Reference Models
Reference models for real-time systems are important to provide a
framework for designing, analyzing, and implementing real-time systems
• Basic Model of Real-Time System
• RTS Model=Processor Model + Resource Model + Task
Model + Communication model
Processor Model:
it specifies the characteristics of the processor used in the real-time
system, such as its clock speed, memory size, and instruction set architecture.
Resource model:
it specifies resources such as memory, I/O devices, and network
interfaces
Task model:
this model specifies the tasks to be performed by the real-time system,
such as data acquisition, processing, and communication.
Communication model:
This specifies the communication protocols and mechanisms used by the
real-time system, such as message passing, shared memory, and sockets
Temporal Parameters of Real-Time Workload
• The temporal parameters of real-time workload must be carefully designed and
analyzed to ensure that the system meets its real-time requirements and operates
efficiently and effectively
• These parameters include the following.
• Deadline - A deadline is a time by which a task must be completed
• Response time – it is the time taken for a task to be completed after it is
received by the system
• Period - The period is the time interval between the start of two consecutive
instances of a periodic task
• Execution time - The execution time must be short enough to meet the
system's real-time requirements and ensure that the task
completes before its deadline.
• Jitter - Jitter is the variation in the response time or execution time of a task.
Jitter can be caused by various factors, such as scheduling policies,
Precedence Constraints
• It is used to specify the order in which tasks must be executed to meet
the system's timing requirements.
• typically represented as Directed Acyclic Graphs (DAGs)
• Types of Precedence Constraints
• Hard constraints
• Soft constraints
• Ex: J1 < J2 and J1 < J5 Ex: J1< J2 , J2< J3 , J2< J4 , J3< J4
• Data Dependency
• Types
• Control dependency
• Data dependency