Interrupt latency
• What is Interrupt latency?
Interrupt latency is the time that elapses between the occurrence of an interrupt and
the execution of the first instruction of the interrupt service routine (ISR) that
handles the interrupt.
It is a measure of the system’s ability to respond to external events in a timely manner.
The shorter the interrupt latency, the more responsive the system will be.
Importance of Interrupt Latency
• Interrupt latency is an important consideration in the design and optimization of
real-time and embedded systems. These systems often have hard real-time
constraints, meaning that they must respond to external events within a specified
time period.
• A high interrupt latency can result in the system missing a deadline, which can
cause the system to fail or produce incorrect results.
• If interrupts are not handled in a timely manner then the system will exhibit slow
response times.
Context switching
• Context switching:
• In an embedded system, context switching refers to the process of
switching the CPU from one task or thread to another. This is necessary
in a multitasking system, where multiple tasks or threads need to be
executed concurrently.
• During a context switch, the CPU saves the current state of the task or
thread it is executing, including the values of its registers and the
location of the next instruction to be executed. The CPU then loads the
state of the new task or thread and begins executing it.
• Context switching can be a time-consuming process, as it requires the
CPU to save and restore a significant amount of data. In addition,
context switching can cause delays and interruptions in the execution of
tasks, which can impact the performance and responsiveness of the
system.
Characteristics of Embedded systems
• Embedded systems possess certain specific
characteristics and these are unique to each
Embedded system.
1. Application and domain specific
2. Reactive and Real Time
3. Operates in harsh environments
4. Distributed
5. Small Size and weight
6. Power concerns
1. Application and Domain Specific:-
• Each E.S has certain functions to perform and they are developed in such a manner
to do the intended functions only.
• They cannot be used for any other purpose.
• Ex – The embedded control units of the microwave oven cannot be replaced with
AC‟S embedded control unit because the embedded control units of microwave
oven and AC are specifically designed to perform certain specific tasks.
2. Reactive and Real Time:-
• Embedded systems are in constant interaction with the real world through sensors
and user-defined input devices which are connected to the input port of the system.
• Any changes in the real world are captured by the sensors or input devices in real
time and the control algorithm running inside the unit reacts in a designed manner
to bring the controlled output variables to the desired level.
• Example – E.S which are mission critical like flight control systems, Antilock Brake
Systems (ABS) etc are Real Time systems.
3. Operates in Harsh Environment:–
• The design of E.S should take care of the operating conditions of the area where the
system is going to implement.
• Ex – If the system needs to be deployed in a high temperature zone, then all the
components used in the system should be of high temperature grade.
• Also proper shock absorption techniques should be provided to systems which are going
to be commissioned in places subject to high shock.
Distributed: –
– It means that embedded systems may be a part of a larger system.
– Many numbers of such distributed embedded systems form a single large embedded control
unit.
– Ex – Automatic vending machine. It contains a card reader, a vending unit etc. Each of them are
independent embedded units but they work together to perform the overall vending function.
Small Size and Weight:-
• Product aesthetics (size, weight, shape, style, etc) is an important factor in choosing a
product.
• It is convenient to handle a compact device than a bulky product.
Elements of Embedded systems
• An embedded system is a combination of 3 things, Hardware Software
Mechanical Components and it is supposed to do one specific task only. A
typical embedded system contains a single chip controller which acts as
the master brain of the system.
• Diagrammatically an embedded system can be represented as follows:
• Embedded systems are basically designed to regulate a physical variable (such
Microwave Oven) or to manipulate the state of some devices by sending some
signals to the actuators or devices connected to the output port system (such
as temperature in Air Conditioner), in response to the input signal provided by
the end users or sensors which are connected to the input ports.
• The control is achieved by processing the information coming from the sensors
and user interfaces and controlling some actuators that regulate the physical
variable. Keyboards, push button, switches, etc. are Examples of common user
interface input devices and LEDs, LCDs, Piezoelectric buzzers, etc examples for
common user interface output devices for a typical embedded system.
• The memory of the system is responsible for holding the code (control
algorithm and other important configuration details). There are two types of
memories are used in any embedded system. Fixed memory (ROM) is used for
storing code or program. The user cannot change the firmware in this type of
memory. The most common types of memories