You are on page 1of 33

Real time and embedded system

1. Introduction
1.1. Definitions, characteristics and examples of real-time and embedded systems
1.2. Model of real time system
1.3. Types of real time tasks
1.4. Modeling timing constraints
1.5. Computer organization concepts and memory
1.6. Design process

Compiled By Amanuel T. (MSc.) 8/29/2023 1


1.1. Definitions…
• Real-time systems are computer systems that are designed to respond to
events in the environment within a specified time frame.
• Real-time systems are commonly used in industrial control systems,
medical devices, transportation systems, and military applications.
• Embedded systems are a type of real-time system that are integrated into
other devices or systems.

Compiled By Amanuel T. (MSc.) 8/29/2023 2


Cont…..
• They are designed to perform specific functions and operate under specific
environmental conditions.
• Embedded systems typically have limited processing power, memory, and
input/output capabilities compared to general-purpose computers.
• Examples of embedded systems include microcontrollers, automotive
control systems, and home appliances(ex. washing machine).

Compiled By Amanuel T. (MSc.) 8/29/2023 3


Cont….
• Real-time systems are designed to meet specific timing requirements, such
as deadlines, response times, and throughput.
• They must be able to respond to input and generate output within these
specified time structures.
• Timing constraints are a critical component of real-time systems, and they
must be carefully analyzed and modeled during the system design process.

Compiled By Amanuel T. (MSc.) 8/29/2023 4


Cont…..
• There are two types of real-time task models:
• Periodic and aperiodic.
• Periodic tasks are those that occur at regular intervals, such as
generating a report every hour.
• Aperiodic tasks are those that occur irregularly and have no fixed
schedule, such as responding to a user input.
• Real-time systems must be able to handle both types of tasks and ensure
that the timing constraints are met.
Compiled By Amanuel T. (MSc.) 8/29/2023 5
Cont…
• Real-time systems are typically modeled using a four-component model:
• The environment, the system, the control laws, and the plant.
• The environment is the context in which the system operates, including inputs,
outputs, and constraints.
• The system is the hardware and software components that process the inputs and
generate the outputs.
• The control laws define the algorithms and logic that govern the system's behavior.
• The plant refers to the physical processes or devices that the system interacts with.
Compiled By Amanuel T. (MSc.) 8/29/2023 6
Cont……
• Designing real-time and embedded systems is a complex process that
involves several stages, including requirements analysis, system
architecture design, hardware and software design, and testing and
validation.
• Designers must take into account the system's performance requirements,
timing constraints, and environmental constraints.
• They must also ensure that the system is reliable, safe, and secure.

Compiled By Amanuel T. (MSc.) 8/29/2023 7


Cont…
• Real-time and embedded systems are critical components of modern
technology.
• They enable us to automate and control complex processes, improve
safety and efficiency, and enhance our quality of life.
• Understanding the characteristics and design principles of real-time and
embedded systems is essential for developing reliable and effective
systems.

Compiled By Amanuel T. (MSc.) 8/29/2023 8


1.2 Model of real time system
• Real-time systems are designed to meet specific timing requirements, such
as deadlines, response times, and throughput.
• Real-time systems must be carefully designed to ensure that they meet their
timing requirements. This involves analyzing the system's performance,
identifying potential bottlenecks, and improving the system's components and
control laws.
• Real-time systems also require specialized hardware and software, such as
real-time operating systems, specialized processors, and real-time
communication protocols.
Compiled By Amanuel T. (MSc.) 8/29/2023 9
Cont...
• There are four-component models that provides a framework for
understanding and modeling real-time systems.
• Such as environment, hardware and software components, control
laws, and plant.
• By carefully designing and optimizing these components, real-time
systems can meet their timing requirements and provide reliable and
effective solutions for a wide range of applications.

Compiled By Amanuel T. (MSc.) 8/29/2023 10


1.3 Types of real time tasks
• Real-time tasks are classified based on their timing requirements and the
consequences of missing their deadlines.
• Here are the three main types of real-time tasks:
• Hard real-time tasks: These are tasks with strict timing requirements,
where missing a deadline can have catastrophic consequences.

Compiled By Amanuel T. (MSc.) 8/29/2023 11


Cont...
• Hard real-time tasks are typically found in safety-critical applications,
such as medical devices, aerospace, and defense systems.
• Examples of hard real-time tasks include airbag deployment in a car,
missile guidance in a defense system, and insulin delivery in a medical
device.

Compiled By Amanuel T. (MSc.) 8/29/2023 12


Cont...
• Soft real-time tasks: These are tasks with timing requirements that are not
as strict as hard real-time tasks, where missing a deadline may not result
in catastrophic consequences.
• Soft real-time tasks are typically found in multimedia and entertainment
applications, such as video streaming and gaming.
• Examples of soft real-time tasks include video playback, audio version,
and game version.

Compiled By Amanuel T. (MSc.) 8/29/2023 13


Cont...
• Firm real-time tasks: These are tasks with some degree of flexibility in
their timing requirements, but they still have a deadline that needs to be
met with a high probability.
• Missing a deadline in firm real-time tasks can have significant but not
catastrophic consequences.
• Firm real-time tasks are typically found in control and automation
systems, such as process control and robotics.

Compiled By Amanuel T. (MSc.) 8/29/2023 14


Cont...
• Examples of firm real-time tasks include temperature control in a
chemical plant, robotic support control in a manufacturing plant, and
traffic light control in a city.
• In addition to the above types of real-time tasks, there are also periodic
and aperiodic tasks. Periodic tasks are tasks that occur at regular intervals,
while aperiodic tasks are tasks that occur irregularly or unpredictably.

Compiled By Amanuel T. (MSc.) 8/29/2023 15


Cont...
• Both types of tasks can be hard, soft, or firm real-time tasks.
• The classification of real-time tasks is important for designing real-time
systems and for selecting appropriate scheduling algorithms and analysis
techniques.

Compiled By Amanuel T. (MSc.) 8/29/2023 16


1.4 Modeling timing constraints
• Modeling timing constraints is a critical task in many engineering and
design domains.
• Timing constraints refer to the temporal relationships between events,
and they can be expressed in a variety of ways, such as time intervals,
deadlines, arrival times, and execution times.
• Modeling timing constraints involves representing these relationships
mathematically, often using constraint-based programming or discrete
event simulation.
Compiled By Amanuel T. (MSc.) 8/29/2023 17
Cont...
• One common approach to modeling timing constraints is to use a network of
timed automata.
• Timed automata are finite-state machines that include timing variables,
which enable them to model the behavior of systems with timing constraints.
• In this approach, the system is modeled as a collection of automata, each
representing a component of the system, and the relationships between them
are modeled as synchronization constraints.

Compiled By Amanuel T. (MSc.) 8/29/2023 18


Cont...
• The resulting model can be analyzed to verify that the system satisfies its timing
constraints.
• Another approach is to use mathematical programming to model timing
constraints.
• This involves formulating the problem as an optimization problem, with the
objective of minimizing or maximizing a certain quantity subject to the timing
constraints.
• This approach can be used to model a wide range of timing constraints, such as
resource constraints, sequencing constraints, and deadline constraints.
Compiled By Amanuel T. (MSc.) 8/29/2023 19
Cont...
• In addition to these approaches, there are several specialized tools and
frameworks for modeling timing constraints in specific domains, such as
circuit design, robotics, and transportation.
• These tools typically provide a high-level modeling language that
abstracts away the low-level details of the timing constraints, making it
easier for designers and engineers to specify and analyze the timing
requirements of their systems.

Compiled By Amanuel T. (MSc.) 8/29/2023 20


Cont...
• Modeling timing constraints is a challenging task that requires a deep
understanding of both the system being modeled and the tools and
techniques used to represent and analyze its timing behavior.
• With the increasing complexity of modern systems, the importance of
accurate and efficient timing modeling and analysis is becoming ever
more crucial.

Compiled By Amanuel T. (MSc.) 8/29/2023 21


1.5 Computer organization concepts and
memory
• Computer organization refers to the design and implementation of
computer systems, including hardware and software components.
• It includes the study of computer architecture, which involves the
organization and design of the computer's internal components,
• such as the central processing unit (CPU), memory, input/output devices,
and storage devices.

Compiled By Amanuel T. (MSc.) 8/29/2023 22


Cont...
• Memory is a critical component of a computer system.
• It refers to the storage space where data and instructions are stored
temporarily or permanently. There are several types of memory in a
computer system, including:
• Random Access Memory (RAM): It is a volatile memory that stores data
and instructions that the CPU needs to access quickly.

Compiled By Amanuel T. (MSc.) 8/29/2023 23


Cont...
• RAM is generally divided into two types - dynamic RAM (DRAM) and
static RAM (SRAM).
• Read-Only Memory (ROM): It is a non-volatile memory that stores
instructions that are essential for the computer to boot up. The contents of
ROM cannot be changed.
• Cache Memory: It is a high-speed memory that stores frequently
accessed data and instructions. The CPU accesses cache memory much
faster than it accesses RAM.
Compiled By Amanuel T. (MSc.) 8/29/2023 24
Cont...
• Virtual Memory: It is a technique that allows the computer to use hard
disk space as if it were RAM.
• This technique is used when the computer runs out of physical RAM.
• The organization of memory in a computer system is typically
hierarchical, with different levels of memory arranged in layers.

Compiled By Amanuel T. (MSc.) 8/29/2023 25


Cont...
• The CPU first looks for data and instructions in the cache memory, then
in RAM, and finally in secondary storage devices such as hard disks and
solid-state drives.
• Memory management is an important concept in computer organization.

Compiled By Amanuel T. (MSc.) 8/29/2023 26


Cont...
• It refers to the allocation and management of memory resources in a
computer system.
• Memory management techniques include virtual memory, calling,
segmentation, and swapping.
• These techniques are used to ensure that the computer system has enough
memory to run multiple applications simultaneously without crashing or
slowing down.

Compiled By Amanuel T. (MSc.) 8/29/2023 27


1.6 Design process
• The design process for an embedded system involves several steps,
including:
• Define the system requirements: The first step in designing an embedded
system is to define the system requirements.
• This involves identifying the specific functions that the system needs to
perform, as well as any hardware or software constraints that need to be
taken into account.

Compiled By Amanuel T. (MSc.) 8/29/2023 28


Cont...
• Select the appropriate hardware platform: Once the system requirements have
been defined, the next step is to select the appropriate hardware platform for the
system.
• This may involve selecting a microcontroller or microprocessor, as well as any
other necessary components such as sensors or communication interfaces.
• Develop the software architecture: The software architecture of the embedded
system needs to be developed.
• This involves dividing the system into different software modules and defining
their interfaces and interactions.
Compiled By Amanuel T. (MSc.) 8/29/2023 29
Cont...
• Write the software code: The software code for the embedded system needs to be
written, using the selected programming language and development tools.
• This may involve writing code for the different software modules, as well as
integrating them into a complete system.
• Test and debug the system: Once the software code has been written, the system
needs to be tested and debugged.
• This involves running the system in a real-world environment and identifying and
fixing any issues or bugs that are encountered.

Compiled By Amanuel T. (MSc.) 8/29/2023 30


Cont...
• Integrate the system: After the software code has been tested and debugged,
the system needs to be integrated with the selected hardware platform.
• This involves connecting the hardware components and testing the integrated
system to ensure that it works as intended.
• Deploy the system: Finally, the embedded system can be deployed, which
may involve installing it in a specific device or environment.
• Ongoing maintenance and support may also be required to ensure that the
system continues to function properly over time.

Compiled By Amanuel T. (MSc.) 8/29/2023 31


Cont...
• Throughout the design process, it is important to consider factors such as
power consumption, size, and cost,
• As these can have a significant impact on the overall performance and
usability of the embedded system.
• Effective communication and collaboration between team members, as
well as thorough testing and documentation, are also essential to ensure
that the design process is successful.

Compiled By Amanuel T. (MSc.) 8/29/2023 32


Compiled By Amanuel T. (MSc.) 8/29/2023 33

You might also like