0% found this document useful (0 votes)
4 views23 pages

Real-Time and Embedded Systems - Lecture Slide Chp-1

The document outlines a course on Real-Time and Embedded Systems, emphasizing the integration of software and hardware to perform specific tasks in various applications. It covers fundamental concepts, characteristics, and classifications of embedded systems, as well as their comparison with general-purpose computing. Additionally, it highlights the importance of real-time responsiveness and the constraints faced in embedded system design.

Uploaded by

imiali.fr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views23 pages

Real-Time and Embedded Systems - Lecture Slide Chp-1

The document outlines a course on Real-Time and Embedded Systems, emphasizing the integration of software and hardware to perform specific tasks in various applications. It covers fundamental concepts, characteristics, and classifications of embedded systems, as well as their comparison with general-purpose computing. Additionally, it highlights the importance of real-time responsiveness and the constraints faced in embedded system design.

Uploaded by

imiali.fr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

3/11/2024

Real-Time and
Embedded
Systems
CoSc4412
Dagmawi Lemma (PhD)
Assistant Professor
[email protected]
Department of Computer Science,
Addis Ababa University

t.me/EmbeddedSystemsCourse

The Course
• The advancement of digital technology has revolutionized the
utilization of computer systems across diverse fields, leading to
their ubiquitous presence in various scales and applications.
From large-scale industrial operations to personal activities
and household appliances, computers have become
indispensable. Consequently, the proliferation of embedded
systems has surged, catering to specialized services while
requiring real-time responsiveness.
Real-Time and Embedded Systems

• This course offers a comprehensive exploration of real-time


and embedded systems, which are tailored to deliver specific
functionalities while being intricately integrated into various
devices. It delves into the fundamental concepts and
techniques unique to these systems, contrasting them with
traditional general-purpose computing paradigms.

1
3/11/2024

Outline

Architecture ES-
Introduction and Development
Components Life Cycle

Real-Time and Embedded Systems


Real-Time Embedded Application
Operating System Area and
System Platform Case Studies

Introduction
1. Understanding Embedded Systems
 Compare and Contrast with General-Purpose Computer Systems:
 Explore the differences between embedded systems and general-purpose computer systems,
highlighting their unique characteristics and applications.
 Special Requirements of Embedded Systems:
 Discuss the specific requirements and constraints inherent to embedded systems, such as real-time
operation, low power consumption, and reliability.
 Embedded Systems Application Areas:
Real-Time and Embedded Systems

 Survey the diverse application areas of embedded systems, ranging from consumer electronics to
automotive and industrial control.

2. Understanding Real-Time Systems


 The Notion of Time:
 Examine key concepts related to time in real-time systems, including deadlines, execution time,
task arrival time, and periods. Discuss their significance in ensuring timely responsiveness.
 Hard and Soft Real-Time Systems:
 Differentiate between hard and soft real-time systems, exploring their respective characteristics,
constraints, and applications.

2
3/11/2024

What is Embedded System?


• A system is considered to be an
Embedded System if the software
part is firmly integrated with
the hardware part, and executes
predefined specific task/s.
 Firmly Integrated means, the code is
stored in the device (microcontroller)
and it is the only code that the device
will execute, whenever it is turned on. Traffic Light Gate Controller
Controller
 Predefined Specific Task means, the

Real-Time and Embedded Systems


software code is designed to execute
some logic to meet a specific
requirement and the device is
dedicatedly run that same code
embedded in it.

• NOTE: a microcontroller could be


programmed to server requirement Microwave Irrigation
of various domain, but it is System Pump Manager
dedicated only for one of the system
embedded into it.

Comparison with General-Purpose


Computer Systems
• From your previous courses, you know • These characteristics of computer (i.e.,
that a computer is an electronic general purpose computers) can be
machine that helps us computing in a considered in embedded system but with
more efficient and effective way. modified context
• Among other reasons, this machine
excel and become to be the dominant
one over many electronic devices due to
its special characteristics:
 Speed
Real-Time and Embedded Systems

 Accuracy
 Diligence
 Versatility
 Reliability
 Consistency
 Memory
 Storage Capacity
 Remembrance Power
 Automation

3
3/11/2024

Comparison with General-Purpose


Computer Systems
General Purpose Computer Embedded Systems
Speed Has become faster than ever Faster than human performance and fit
and able to use multi-core for purpose
Accuracy As accurate as the algorithm When working with sensors, especially,
calibration might be required
Diligence Yes, it is a machine after all Yes …

Real-Time and Embedded Systems


Versatility Dynamic Static
Reliability Reliable Acceptably reliable
Consistency Consistency Acceptably consistent
Memory Adequate (up to TB) Very limited (often in KB)
Storage Capacity Extremely sufficient and Very limited (often in KB)
expandable
Remembrance Power Long last N/A

Features of Embedded System


• We need to know some of
its features those may
demand special Thus it is compelling to focus
considerations when on specific application.
developing an Embedded And, by computer system, it
System. means both the system of
hardware and software need
Constraints and
Real-Time and Embedded Systems

• due consideration in the


requirements design
 Massive computational
resources
 Small in size
 Light in Weight
 Very low power consumption

4
3/11/2024

Dagmawi Lemma - 2023


RT & ES Characteristics
• System Structure
• Real-Time Response
• Highly Constrained Environments

Real-TIme and Embedded Systems


• Concurrency

• Predictability

• Safety and Reliability

Dagmawi Lemma - 2023


… Characteristics (Continued)
• System Structure
 A real-time embedded system interacts with its environment
continuously and timely
 Sensors and actuators are used to control or monitor the
environment
 most of the data from physical environment is in the form of analog
signals
 Analog signals need to be converted to digital to manipulate the data using a
Real-TIme and Embedded Systems

microprocessor
 Need to be converted to digital signals – an analog-to-digit converter (ADC)
is needed in between a sensor and a microprocessor
 Controller is the brain of embedded system
 Controller = one or more microprocessors + memory + some peripherals + a
real-time software application
 The controller acts through actuators
 Need to convert digital signals to analog, hence a digit-to-analog
conversion (DAC) needs to be performed in order to apply the
microprocessor output to the actuator

10

5
3/11/2024

Dagmawi Lemma - 2023


… Characteristics (Continued)

Real-TIme and Embedded Systems


11

Dagmawi Lemma - 2023


… Characteristics (Continued)
• Real-Time Response
 has to finish certain tasks within specified time
boundaries
 Real-time systems are expected to execute all
tasks by their deadlines
Real-TIme and Embedded Systems

 Deadlines of real-time tasks are typically derived from


the required responsiveness of the sensors, actuators,
and the dynamics of the target that the embedded
system controls

12

6
3/11/2024

Dagmawi Lemma - 2023


… Characteristics (Continued)
• Highly Constrained Environments
 constrained in terms of processor speed, memory capacity, and user
interface
 in the realm of IoT power constraint is included
 Real-time embedded systems are often run in highly resource-
constrained environments, which make the system design and
performance optimization quite challenging
 Often equipped with 8-bit processors

Real-TIme and Embedded Systems


 Examples: systems embedded in dishwashers, microwaves, coffee makers,
and digital watches
 Therefore, embedded systems must be optimized in terms of
 Size and weight – easy to mount
 Reliability – deadlines and criticalness
 Performance – service on-time but not necessarily fast + efficient use of
limited memory
 Cost - affordability
 Power consumption - remote deployment need

13

Dagmawi Lemma - 2023


… Characteristics (Continued)
• Concurrency
 Concurrency refers to a property of systems in
which several computations (tasks) are
executing simultaneously and potentially
interacting with each other
Real-TIme and Embedded Systems

 Almost all tasks have strict constraints on the


response time – deadline
 All deadlines should be met

14

7
3/11/2024

Dagmawi Lemma - 2023


… Characteristics (Continued)
• Predictability
 A real-time system must behave in a way that can
be predicted in terms of all timing requirements
 must be mathematically predictable if a specific task can
be completed before a given deadline
 Factors to prediction

Real-TIme and Embedded Systems


 workload,
 processor speed
 run-time operating system support
 process and thread priorities
 scheduling algorithm,
 communication infrastructure, and so on

15

Dagmawi Lemma - 2023


… Characteristics (Continued)
• Safety and Reliability
 safety-critical real-time embedded systems must have
high reliability
 E.g. cardiac pacemakers, flight control systems, elevator, etc.
 Safety:
 “freedom from accidents or losses”
 usually concerned with safety in the absence of faults as well as
Real-TIme and Embedded Systems

in the presence of single-point faults


 Reliability:
 refers to the ability of a system or component to perform its
required functions under stated conditions for a specified time
 measured in failures per million operating hours. For example,
the requirement for a typical automotive microcontroller is 0.12
failures per million operating hours.
Jiacun Wang 2017

16

8
3/11/2024

Dagmawi Lemma - 2023


Broad Classification of Embedded
Systems
• Stand alone embedded system
 The software is embedded in the hardware system but not
necessary over the platform of RTOS
• Networked appliances
 Specific purpose multiple (more than one) hardware those are
hosting and meant for a specific purpose might need to
communicate with one another, hence such appliances might need
to communicate to one another over a certain network

Real-TIme and Embedded Systems


 E.g. IoT

• Real-time embedded system


 Where the software is embedded in the hardware system running over the
RTOS platform

• Mobile devices
 Our mobiles are turning to be one

17

Application Areas
• Embedded systems are now almost everywhere:
 Home Appliances Medical
Automotive
 Infrastructures
 Industry
 Medical Devices
 Construction Communications
Military
Real-Time and Embedded Systems

 Business Managements
 Scientific Devices
 Communication Devices
 Automotive
 Military Weapons and Ancillaries Comsumer Industrial
 Consumer Products
 etc.

18

9
3/11/2024

Application Areas : Configuration


• While embedded systems can be applied in various
domain, the components we bring together to build
such system varies.
• Most commonly microcontroller is at the center of
embedded systems and it is used to process the logics
(and the arithmetic) in the context of the respective
application area.

Real-Time and Embedded Systems


• The input and output to the system and from the
system is handled by sensors and actuators
respectively.
 However, that doesn’t mean both are required all the
time.

19

Application Areas : Configuration


Embedded system
Microcontroller LM3S or TM4C
Microcontroller Electrical,
mechanical,
Processor chemical,
Sensors/Actuators
and/or

I/O Ports or
Other Electrical Devices Physical
Real-Time and Embedded Systems

(e.g., keypad) World


RAM optical
devices
ROM DAC Analog
Bus ADC signals

20

10
3/11/2024

Application Areas : Configuration


• Aviation Obstruction Light
(AOL) or Aircraft Warning
Light (ACWL).
• Aviation authorities
specified Red and White

Real-Time and Embedded Systems


lights are to be used to warn
aircraft of tall structures.

21

Application Areas : Configuration


• Railway Crossing Traffic Light
Real-Time and Embedded Systems

22

11
3/11/2024

Internet of Things
• Understanding IoT • This section is part of
 Evolution that introduces IoT Chapter 2 that aims to
introduce recent
• What it is actually developments in computing

CoSc6302 - Advanced Computer Networks: by


 Defining IoT and setting the
context
and related to computer
networks.
• IoT Architecture
 Various ways how IoT is
• In this Section of Chapter 2,
organized overview and architecture

Dagmawi Lemma
(alternative architecture) of
IoT

23

Understanding IoT
Internet of
Things: enable the
things to be connected
over a network (over
PAN, LAN, WAN, or the
Internet) that was
WAN: enables the meant to connect the
Computers: human-user to computers. But
meant to enable data communicate globally human-user are not
processing, storage and as computers situated expected, necessarily,
retrieval efficient and miles away can be to operate the
effective connected. THINGS.

Computer Internet: enables


Networking: the human-users to
enables to connect the connect and
computers so that data communicate, even
and resource sharing share resources
would be efficient and without actually
effective. Actually, at knowing each other,
each side of the and without being in
computers there is a the same network.
human-user.

CoSc6302 - Advanced Computer Networks: by Dagmawi Lemma 24

12
3/11/2024

Understanding IoT (continued)

Internet of Things: What would it


take to enable the things so that
they may be connected over a
network? And do some computing?

CoSc6302 - Advanced Computer Networks: by Dagmawi Lemma 25

Understanding IoT (continued)


Compute Network capability
•take input •being connected with similar or deferent
•process the input and apply some arithmetic devices
and logic
•take action (output)
•store the input/output

Be identified uniquely (need to have


address)

CoSc6302 - Advanced Computer Networks: by Dagmawi Lemma 26

13
3/11/2024

Internet of Things (IoT)


• What is IoT?
 IoT is a system where the “things” we use as
individual or as a group are connected to one
another via a network (over Internet

CoSc6302 - Advanced Computer Networks: by


protocol) to collaborate and perform some
task while interacting with the digital and
physical world.
• Should it always involve Internet?

Dagmawi Lemma
• How is it organized and what components
are involved?
27

IoT Architecture
• IoT
requirements, broadly, can be related to
most activities in computing.
Perception collecting data from the physical world with less or no intervention of the user, hence
various sensors are used
CoSc6302 - Advanced Computer Networks: by

Preprocessing collected data shall be preprocessed before relayed over a network; this also includes data
filtering

Communication different entities, the “things” we need to accomplish the task, need to communicate using
various protocols and standards
the data collected and communicated shall ultimately need to be processed to meet
Dagmawi Lemma

Application requirements of the end user (business/individual user) while improving the user experience
• This may include to take action with less or no intervention by the user, hence actuators can be used

Monitoring
it is important to monitor the environment and resource (scarce resource)

28

14
3/11/2024

IoT Architecture (continued)


• Therequirements can be addressed if there
are architectural elements delivering the
respective service; and the architecture of
IoT system may vary across application

CoSc6302 - Advanced Computer Networks: by


domain.
• Though no particular consensus on the
architecture, layered approach has become

Dagmawi Lemma
predominant in IoT, particular three-
layered or five-layered.

29

The Layered Architecture in IoT


• Three-layered model organizes the
services needed to meet the requirement
into three levels:
CoSc6302 - Advanced Computer Networks: by

 Perception Layer
 Network Layer
Application
 Application
Layer Layer
Responsible for delivering application specific service

Network Responsible for connectivity and processing the raw data captured
Dagmawi Lemma

Layer from sensors in such a way it is meaningful for use


Perception Capturing information from (or acting in) the environment.
Layer Sensors/actuators are used to act in the physical environment

Diagram adapted from www.edureka.co/iot-certification-training

30

15
3/11/2024

The Layered Architecture (continued)


• Network Layer
 Stimuli from the environment can be received
by the sensor and will be converted into digital
information (actually signal), that can be

CoSc6302 - Advanced Computer Networks: by


conveyed over the network infrastructure.
 However, this information has to be
 Interpreted in such a way it is meaningful to the
desired application
 The information (often after interpretation) shall be

Dagmawi Lemma
communicated for decision making and/or further
processing

31

The Layered Architecture (continued)


• Infive-layered model, the services provided
at the network layer of the three-layered
model split into two layers – the
CoSc6302 - Advanced Computer Networks: by

Transport Layer and Processing Layer


• Also
a Business Layer is newly added as
management would become important
when the IoT system become wider and
Dagmawi Lemma

complicated

32

16
3/11/2024

The Layered Architecture (continued)


Business
Manages the whole IoT system, including: applications, users’ privacy, business model, etc.
Layer
Application
Responsible for delivering application specific service
Layer

CoSc6302 - Advanced Computer Networks: by


Application
Processing Responsible for processing sensor data (huge amount of data), which might require to employ
Responsible for delivering application specific service
Layer database, cloud computing and big data modules
Transport
Network
Processing Responsible
Responsiblefor
forconnectivity
processing and
sensor
processing
data (huge
theamount
raw dataof captured
data), which
frommight
sensors
require
in such
to employ
a way it
Responsible for connectivity and communicating sensor data
Layer database, cloudis computing
meaningfuland
for use
big data modules
Capturing information from the environment. Predominantly sensors are used to sense and
Perception Layer
gather information from the physical environment

Dagmawi Lemma
Diagram adapted from www.edureka.co/iot-certification-training

33

The Layered Architecture (continued)


• Perception Layer
 Note that, any computing is about collecting data (input), processing and delivering information for
further processing or action (output).
 But how the data collection, processing and outputting the result (actuating the action) might vary
across technologies and computing principle.
CoSc6302 - Advanced Computer Networks: by

 Data can be collected:


 Explicitly
 as user input or command
 Implicitly
 by observing changes in the environment (physical environment, user environment and/or the digital environment)
 by collecting predefined values tagged in the environment

Physical
Dagmawi Lemma

Human Digital
Ecological Physical Personal / Social / Public local / global
(Living) Phenomena

Taxonomy of Environment in View of


Computing Computer System
Adapted from Posland(2009)
34

17
3/11/2024

The Layered Architecture (continued)


• Perception Layer (continued)
 In IoT, sensors are widely used to
collect data from the physical
environment.
 Sensors (electrical sensors) are key
players at the perception layer:

CoSc6302 - Advanced Computer Networks: by


 they are the bridge between the
physical world and the digital world.
 sensors are a type of transducer that
converts some physical phenomenon
such as heat, light, sound, humidity, http://www.efxkits.com/blog/different-types-
etc. into electrical signals. of-transducers-in-practical-applications/
 any device which is able convert one
form of energy into another form is

Dagmawi Lemma
called as a transducer.
 For example, even a speaker can be
called as a transducer as it converts
electrical signal to pressure waves
(sound).

35

The Layered Architecture (continued)


• Perception Layer (continued)
 The phenomena in the physical world, which is made of
atoms, are in the form of physical variable and is based
on analog signals.
CoSc6302 - Advanced Computer Networks: by

Whereas, the computing world demands information to be digital


 Sensors bridge this gap as they are able to devices that convert a
physical variable into an electrical signal
 A wide range of variables can be perceived from the
environment for digital processing
 temperature, humidity, soil moisture, light intensity, sound,
Dagmawi Lemma

pressure, wind (speed, direction), position, proximity,


displacement, acceleration, orientation, heath, smoke, motion,
vibration, RF, water (level, flow, quality, turbidity, PH, pollution,
particulates, gas, radioactivity, etc.)

36

18
3/11/2024

The Layered Architecture (continued)


• Transport Layer
 This layer transport data from the perception
layer to the application layer

CoSc6302 - Advanced Computer Networks: by


 Various wireless and/or wired medium could be
used such as UTP-LAN, Bluetooth, RFID, WiFi,
NFC, etc.

Dagmawi Lemma
37

The Layered Architecture (continued)


• Processing Layer
 Data processing as per the user
(system) requirements is done at this
layer
tTx  The processing may employ various
storage and computing models and
CoSc6302 - Advanced Computer Networks: by

tRx technologies; such as cloud


computing, web services, big data,
database systems, etc.
sensing location external object  For example, an ultrasonic sensor can
be useful to proximity of an external
object from the sensing object.
 what the ultrasonic sensor actually
Dagmawi Lemma

∆ report is the change in time (timeTx –


𝑆 , where V=speed of sound timeRx) – that is the time waited to
receive the reflected sound since its
transmission
 further calculation is needed to
determine the distance

38

19
3/11/2024

The Layered Architecture (continued)


• Application Layer
 The data after captured and processed is
interpreted in the context of the use, and it then
can be used to make decision (actuating) and/or

CoSc6302 - Advanced Computer Networks: by


as input for further processing; and this is done
at the application layer
 The Application Layer is where the use case
implemented.
 For instance, in the ultrasonic example we use

Dagmawi Lemma
(previous slide), the calculated distance may
require actuation on a vehicle break system

39

The Layered Architecture (continued)


• Business Layer
 As the IoT system becomes complex, management will become Management
important aspect to consider
 All the four layers focus on responsibilities to meet the
functional requirements Input Process Output
CoSc6302 - Advanced Computer Networks: by

 Perception layer – data input


 Processing layer – does the processing
 Application layer – information output as specific service
 Transport layer – connecting and three layers to relay data
between the layers Store

 The management on the other hands handles nonfunctional Von Neumann Architecture
requirements aspect so as to assure the proper delivery of the
functional requirements
Dagmawi Lemma

 Therefore the business layer is responsible managing


applications, remotely devices (e.g., does the device function
properly), business and process models, and privacy and security

40

20
3/11/2024

The Layered Architecture (continued)


• In summary, IoT is one application area of
embedded systems:
 To develop the perception layer

CoSc6302 - Advanced Computer Networks: by


 E.g., by integrating sensors and/or actuators with
micro controllers.
 To facilitate the communication platform, as
most network nodes such as switch and router
rely on embedded system.

Dagmawi Lemma
41

Event-Driven Vs Real-Time
• In computing a task (or execution) is started if the command to
initiate the task is triggered:
 Explicitly by the user,
 Upon arrival of a certain triggering factor, such as when data
arrived (such as sensor data), or
CoSc6302 - Advanced Computer Networks: by

 By waiting for scheduled time.


• The first two situations can be associated with the concept of
“Event” while the last one is associated with “Time”.
• A system, that does execution by waiting for event (data entry,
data reception, user feedback, etc.) is considered as event-
driven systems.
Dagmawi Lemma

• On the other hand, systems that does execution by relating


(prioritising and scheduling) tasks with time are real-time
systems.

42

21
3/11/2024

The Notion of Time


• Real-Time systems take into account time
into:
 Period: An amount of time in which a certain task
(T) should be executed and has predefined starting
and finishing moments.

CoSc6302 - Advanced Computer Networks: by


 Arrival Time: A specific moment (or time t) at
which a certain task (T) should start executing.
 Deadline: A specific moment (or time t) at
which a certain task (T) should start
executing.

Dagmawi Lemma
 Capacity: An amount of time required to complete a
certain task (T).

43

The Notion of Time (continued)


• It is important to note that:
 The deadline should be respected otherwise if the system failed to
complete the task before the deadline there will be system error.
 Regardless of the computing result, in real-time systems if the result is
delivered after the deadline, then the task is considered as erroneous.
 A period for task (TP) should be enough to run the task which has
CoSc6302 - Advanced Computer Networks: by

capacity (Tc).
 Hence:
 desirably 𝑇 𝑇,
 unconditionally 𝑇𝑝 𝑇𝑐
 The arrival time of a task (Ta) should before the deadline (Td) and
the difference should always be less than the capacity (Tc) of the
task.
Dagmawi Lemma

 Hence:
 desirably 𝑇 |𝑇 𝑇 |,
 unconditionally 𝑇 |𝑇 𝑇|

44

22
3/11/2024

Hard Vs Soft Real-Time Systems


•A real-time system can be classified as,
 Hard real-time system: when missing deadline
has devastating impact like life loss, financial

CoSc6302 - Advanced Computer Networks: by


damage, business disruption, endangering the
wellbeing of human (or any system).
 Soft real-time system: when missing deadline
may have some impact or can be dissatisfactory
but tolerable and does not have devastating

Dagmawi Lemma
impact.

45

23

You might also like