GAMBELLA
UNIVERSITY
REAL TIME AND EMBEDDED SYSTEMS
BY: DECH R.
Chapter 1: Introduction
Definitions, characteristics and examples of
real-time and embedded systems
• A system designed to perform one or a few dedicated functions.
• Uses microprocessors, microcontrollers or Field Programmable Gate
Arrays (FPGAs).
• Run with limited computer hardware resources. e.g limited memory
Some examples of embedded systems
What is a real-time system
A system that always responds to external input, or a timer.
– Does not mean “real fast” (it can be slower)!
– Can determine (predict) accurately when a section of program is
executed.
• Its operation means the timing behavior of the system should be
deterministic (i.e the system should respond to requests in a known
amount of time).
• Example – flight control systems.
• Hard real-time
Responses occur absolutely within the required deadline. missing deadline
causes failure.
• Soft real-time
– missing deadline results in degraded performance but not a complete failure
(example: DAQ-systems)
LabVIEW Real-time (RT) systems
LabVIEW code can be made to execute with hard real-time performance
• The application is developed under Windows on a regular PC, and then
downloaded to run on the real-time target
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
7. Single-functioned
8. Complex functionality
1. Application and Domain Specific:-
• Each E.S has certain functions to perform 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.
2. Reactive and Real Time:-
• E.S are in constant interaction with the real world through sensors and
user-defined input devices
• Any changes in the real world are captured by the sensors or input devices
in real time with the control of algorithm.
• E.S produce changes in output due to the changes in the input, so they are
referred as reactive systems.
3. Operates in Harsh Environment :–
• Designed to 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.
4. Distributed: –
• May be a part of a larger system.
• Many distributed ES form a single large embedded control unit.
• Ex – Automatic Teller Machine
5. Small Size and Weight:-
• It is better to handle a compact device than a bulky product.
6. Power Concerns:-
• An important factor that needs to be considered when designing ES.
7. Single-functioned:- Dedicated to perform a single function
8. Complex functionality: - Run complex or multiple algorithms.
Operational Quality Attributes
Refer to relevant quality attributes of the system when it is in online mode.
1. Maintainability:-
It deals with support and maintenance to the end user or client or regular
checkup.
•Reliability and maintainability are complementary to each other.
• A more reliable system has less corrective maintainability requirements and
vice versa.
• Classified into two categories
a. Scheduled or Periodic maintenance (Preventive maintenance)
b. Corrective maintenance to unexpected failures
2. Security:-
• Confidentiality deals with protection of data and application from
unauthorized disclosure.
• Integrity deals with the protection of data and application from unauthorized
modification.
• Availability deals with protection of data and application from unauthorized
users.
3. Safety :-
Possible damages happen due to the breakdown of an Embedded System.
The breakdown may occur due to a hardware failure or a firmware failure. Safety
analysis is a must to evaluate the damages and determine the best course of
action to bring down the consequences of damage to an acceptable level.
II. Non-Operational Quality Attributes: The quality attributes that needs to be
addressed for the product not on the basis of operational aspects are grouped under
this category.
1. Testability and Debug-ability:-
• Testability deals with how easily one can test the design, application and by which
means it can be done.
• Both hardware and firmware of an ES should be tested
• hardware testing ensures that the peripherals and total hardware functions in
the desired manner, whereas firmware testing ensures that the firmware is
functioning in the expected way.
Debug-ability is a means of debugging the product from unexpected behavior in
the system
• Debug-ability is two level process
1. Hardware level: finding the issues created by hardware problems.
2. Software level: finding the errors created by the flaws in the software.
Model of real time systems
Firmware development starts with the conversion of the firmware requirements
into a program model using modeling tools that supports a model of computation.
programmer needs to understand the memory model of the programming
language in order to avoid reading data that may be invalid.
The Real Time Task
The Real Time Kernel: Highly specialized and it contains only the minimal set of
services required for running the user applications/tasks. The basic functions of a
Real Time kernel are
a) Task/Process management
b) Task/Process scheduling
c) Task/Process synchronization
d) Error/Exception handling
e) Memory Management
f) Interrupt handling
g) Time management
Computer organization concepts and memory
Computer Architecture in general covers three aspects of computer design
namely: Computer Hardware, Instruction set Architecture and Computer
Organization.
Computer hardware (electronic circuits, displays, magnetic and optical storage
media and communication facilities).
Instruction set Architecture ( instruction set, registers, memory organization and
exception handling).
Computer Organization (memory system, the bus structure and the design of
the internal CPU).
Embedded system design constraints
Cost: competitive markets penalize products which don’t deliver
adequate value for the cost
Performance: perform required operations (throughput)
Meet real-time deadlines (latency)
Size and weight limits
Mobile (aviation, automotive) and portable (e.g. handheld)
systems
Power and energy limits
Battery capacity
Cooling limits
Environment
Temperatures may range from -40°C to 125°C, or even more.
Microcontrollers/SoCs (rather than microprocessors)
Include peripherals to interface with other devices.
Programming language
Programmed in C rather than Java (smaller and faster code)
Some performance-critical code may be in assembly language
Hierarchical design with SW libraries (math, I/O drivers, etc.)
Real-time task
real time refers to physical time in which the computer executes the task.
Typically, tasks have deadlines, which are values of physical time by which the
task must be completed.
All of these situations require a scheduling strategy.
A scheduler decides what task to execute next when faced with a choice in the
execution of a concurrent program or set of programs.
In general, a scheduler may have more than one processor available to it (for
example in a multicore system).
Con’t
A multiprocessor scheduler needs to decide not only which task to execute next,
but also on which processor to execute it. The choice of processor is called
processor assignment.
A scheduling decision is a decision to execute a task, and it has the following
three parts:
• assignment: which processor should execute the task;
• ordering: in what order each processor should execute its tasks; and
• timing: the time at which each task executes.
QUESTION???
Exciting new transitions
THE END

Embedded system-1 is a first note for fourth year students

  • 1.
    GAMBELLA UNIVERSITY REAL TIME ANDEMBEDDED SYSTEMS BY: DECH R.
  • 2.
    Chapter 1: Introduction Definitions,characteristics and examples of real-time and embedded systems • A system designed to perform one or a few dedicated functions. • Uses microprocessors, microcontrollers or Field Programmable Gate Arrays (FPGAs). • Run with limited computer hardware resources. e.g limited memory
  • 3.
    Some examples ofembedded systems
  • 4.
    What is areal-time system A system that always responds to external input, or a timer. – Does not mean “real fast” (it can be slower)! – Can determine (predict) accurately when a section of program is executed. • Its operation means the timing behavior of the system should be deterministic (i.e the system should respond to requests in a known amount of time). • Example – flight control systems.
  • 5.
    • Hard real-time Responsesoccur absolutely within the required deadline. missing deadline causes failure. • Soft real-time – missing deadline results in degraded performance but not a complete failure (example: DAQ-systems) LabVIEW Real-time (RT) systems LabVIEW code can be made to execute with hard real-time performance • The application is developed under Windows on a regular PC, and then downloaded to run on the real-time target
  • 6.
    Characteristics of Embeddedsystems: 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 7. Single-functioned 8. Complex functionality
  • 7.
    1. Application andDomain Specific:- • Each E.S has certain functions to perform 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.
  • 8.
    2. Reactive andReal Time:- • E.S are in constant interaction with the real world through sensors and user-defined input devices • Any changes in the real world are captured by the sensors or input devices in real time with the control of algorithm. • E.S produce changes in output due to the changes in the input, so they are referred as reactive systems.
  • 9.
    3. Operates inHarsh Environment :– • Designed to 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.
  • 10.
    4. Distributed: – •May be a part of a larger system. • Many distributed ES form a single large embedded control unit. • Ex – Automatic Teller Machine 5. Small Size and Weight:- • It is better to handle a compact device than a bulky product.
  • 11.
    6. Power Concerns:- •An important factor that needs to be considered when designing ES. 7. Single-functioned:- Dedicated to perform a single function 8. Complex functionality: - Run complex or multiple algorithms.
  • 12.
    Operational Quality Attributes Referto relevant quality attributes of the system when it is in online mode. 1. Maintainability:- It deals with support and maintenance to the end user or client or regular checkup. •Reliability and maintainability are complementary to each other. • A more reliable system has less corrective maintainability requirements and vice versa. • Classified into two categories a. Scheduled or Periodic maintenance (Preventive maintenance) b. Corrective maintenance to unexpected failures
  • 13.
    2. Security:- • Confidentialitydeals with protection of data and application from unauthorized disclosure. • Integrity deals with the protection of data and application from unauthorized modification. • Availability deals with protection of data and application from unauthorized users. 3. Safety :- Possible damages happen due to the breakdown of an Embedded System. The breakdown may occur due to a hardware failure or a firmware failure. Safety analysis is a must to evaluate the damages and determine the best course of action to bring down the consequences of damage to an acceptable level.
  • 14.
    II. Non-Operational QualityAttributes: The quality attributes that needs to be addressed for the product not on the basis of operational aspects are grouped under this category. 1. Testability and Debug-ability:- • Testability deals with how easily one can test the design, application and by which means it can be done. • Both hardware and firmware of an ES should be tested • hardware testing ensures that the peripherals and total hardware functions in the desired manner, whereas firmware testing ensures that the firmware is functioning in the expected way.
  • 15.
    Debug-ability is ameans of debugging the product from unexpected behavior in the system • Debug-ability is two level process 1. Hardware level: finding the issues created by hardware problems. 2. Software level: finding the errors created by the flaws in the software. Model of real time systems Firmware development starts with the conversion of the firmware requirements into a program model using modeling tools that supports a model of computation. programmer needs to understand the memory model of the programming language in order to avoid reading data that may be invalid.
  • 16.
    The Real TimeTask The Real Time Kernel: Highly specialized and it contains only the minimal set of services required for running the user applications/tasks. The basic functions of a Real Time kernel are a) Task/Process management b) Task/Process scheduling c) Task/Process synchronization d) Error/Exception handling e) Memory Management f) Interrupt handling g) Time management
  • 17.
    Computer organization conceptsand memory Computer Architecture in general covers three aspects of computer design namely: Computer Hardware, Instruction set Architecture and Computer Organization. Computer hardware (electronic circuits, displays, magnetic and optical storage media and communication facilities). Instruction set Architecture ( instruction set, registers, memory organization and exception handling). Computer Organization (memory system, the bus structure and the design of the internal CPU).
  • 18.
    Embedded system designconstraints Cost: competitive markets penalize products which don’t deliver adequate value for the cost Performance: perform required operations (throughput) Meet real-time deadlines (latency) Size and weight limits Mobile (aviation, automotive) and portable (e.g. handheld) systems Power and energy limits Battery capacity Cooling limits
  • 19.
    Environment Temperatures may rangefrom -40°C to 125°C, or even more. Microcontrollers/SoCs (rather than microprocessors) Include peripherals to interface with other devices. Programming language Programmed in C rather than Java (smaller and faster code) Some performance-critical code may be in assembly language Hierarchical design with SW libraries (math, I/O drivers, etc.)
  • 20.
    Real-time task real timerefers to physical time in which the computer executes the task. Typically, tasks have deadlines, which are values of physical time by which the task must be completed. All of these situations require a scheduling strategy. A scheduler decides what task to execute next when faced with a choice in the execution of a concurrent program or set of programs. In general, a scheduler may have more than one processor available to it (for example in a multicore system).
  • 21.
    Con’t A multiprocessor schedulerneeds to decide not only which task to execute next, but also on which processor to execute it. The choice of processor is called processor assignment. A scheduling decision is a decision to execute a task, and it has the following three parts: • assignment: which processor should execute the task; • ordering: in what order each processor should execute its tasks; and • timing: the time at which each task executes.
  • 22.
  • 23.