intro sept 1 introduction to embedded systems and realtime systems

Upload: ashishphoenix10

Post on 03-Apr-2018

232 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/28/2019 Intro Sept 1 Introduction to embedded systems and realtime systems

    1/21

    n ro uc on o em e e

    systems and realtime

    systemsB. RamamurthyCSE321

    This course is partially supported National Science

    Foundation NSF DUE Grant: 0737243

    7/16/2013 1

  • 7/28/2019 Intro Sept 1 Introduction to embedded systems and realtime systems

    2/21

    Introduction to Realtime

    Systems & Embedded SystemsB. RamamurthyCSE321

    This course is partially supported National Science

    Foundation NSF DUE Grant: 0737243

    7/16/2013 2

  • 7/28/2019 Intro Sept 1 Introduction to embedded systems and realtime systems

    3/21

    The course will enable you to:

    Understand and design embeddedsystems and real-time systems

    For real-time systems:

    Identify the unique characteristics of real-timesystems

    Explain the general structure of a real-timesystem

    Define the unique design problems andchallenges of real-time systems

    Apply real-time systems design techniques tovarious software programs.

    7/16/2013 3

  • 7/28/2019 Intro Sept 1 Introduction to embedded systems and realtime systems

    4/21

    Course overview

    For embedded systems it will enableyou to : Understand the basics of an embedded

    system

    Program an embedded system

    Design, implement and test an embeddedsystem.

    Ex: realtime + embedded : games on aGameboy or arcade games

    Ex: realtime: Spore on a laptop

    7/16/2013 4

  • 7/28/2019 Intro Sept 1 Introduction to embedded systems and realtime systems

    5/21

    Example real-time and embedded

    systems

    Domain Application

    Avionics Navigation; displays

    Multimedia Games; simulators

    Medicine Robot surgery; remote surgery;

    medical imaging

    Industrial systems Robot assembly lines;automated inspection

    Civilian Elevator control

    Automotive system; Global

    positioning system (GPS)7/16/2013 5

  • 7/28/2019 Intro Sept 1 Introduction to embedded systems and realtime systems

    6/21

    Lets discuss some realtime system

    (RTS) characteristics

    7/16/2013 6

  • 7/28/2019 Intro Sept 1 Introduction to embedded systems and realtime systems

    7/21

    Realtime Characteristics

    RTS have to respond to events in acertain pre-detemined amount of time. The time constraints have to be considered

    during planning, design, implementation and

    testing phases.

    Internal failures due to software andhardware fault have be handledsatisfactorily.

    You cannot simply pop-up a dialog error boxthat says send report or dont send report.

    Also external failures due to outside sourcesneed to be handled.

    7/16/2013 7

  • 7/28/2019 Intro Sept 1 Introduction to embedded systems and realtime systems

    8/21

    Realtime Characteristics

    (contd.) Typical interaction in an RTS is

    asynchronous. Thus an RTS should

    have features to handle asynchronous

    events such as interrupt handlers anddispatcher and associated resources.

    Potential for race condition: when

    state of resources are timingdependent race condition may occur.

    Periodic tasks are common.

    7/16/2013 8

  • 7/28/2019 Intro Sept 1 Introduction to embedded systems and realtime systems

    9/21

    Embedded System

    Is a special purpose system designedto perform a few dedicated functions.

    Small foot prints (in memory)

    Highly optimized code

    Cell phones, mp3 players are

    examples.

    The components in an mp3 player are

    highly optimized for storage

    operations. (For example, no need to

    have a floating point operation on an7/16/2013 9

  • 7/28/2019 Intro Sept 1 Introduction to embedded systems and realtime systems

    10/21

    Real-time system concepts

    A system is a mapping of a set of input into a set ofoutputs.

    A digital camera is an example of a realtime

    system: set of input including sensors and imaging

    devices producing control signals and displayinformation.

    Realtime system can be viewed as a sequence of

    job to be scheduled.

    Time between presentation of a set of inputs to asystem and the realization of the required behavior,

    including availability of all associated outputs, is

    called the response time of the system.

    7/16/2013 10

  • 7/28/2019 Intro Sept 1 Introduction to embedded systems and realtime systems

    11/21

    Real-time system concepts

    (contd.) Real-time system is the one in which logical

    correctness is based on both the correctness of theoutput as well as their timeliness.

    A soft real-time system is one in which performance

    is degraded by failure to meet response-timeconstraints.

    A hard real-time system is one in which failure tomeet a single deadline may lead to complete andcatastrophic failure.

    More examples: Automatic teller: soft

    Robot vacuum cleaner: firm

    Missile delivery system: hard

    7/16/2013 11

  • 7/28/2019 Intro Sept 1 Introduction to embedded systems and realtime systems

    12/21

    Regular Computer System

    7/16/2013 12

    From Minimalist:

    STIR-FRIED CHICKEN WITH CREAMED CORNTime: 20 minutes

    1 pound boneless chicken (breasts or thighs), in 1/2-inch chunks

    2 tablespoons soy sauce

    1 teaspoon sesame oil

    1 tablespoon sherry, rice wine, sake or white wine

    2 tablespoons peanut oil or another neutral oil, like corn or grape

    seed

    1 tablespoon minced garlic

    1 tablespoon minced ginger

    1 small chili, seeds and stems removed, minced (or dried red chili

    flakes to taste)

    1 15-ounce can creamed corn

    1 cup corn kernels (fresh, frozen or canned)

    Chopped cilantro leaves for garnish.

    1. In a small bowl, mix the chicken with the soy sauce, the sesame oiland the wine. Put the peanut oil into a deep skillet or wok, preferably

    nonstick, and turn heat to high. Drain chicken. When oil is hot, add

    chicken to skillet, and cook, undisturbed, until bottom browns, about 2

    minutes. Stir once or twice, and cook 2 minutes longer. Turn the heat

    down to medium-low.

    2. Add the garlic, the ginger and the chili to the skillet, and stir; 15

    seconds later, add the creamed corn and the corn kernels. Cook,

    stirring occasionally, until heated through, 3 or 4 minutes. Garnish,

    and serve over white rice.

    Data

    Algorithm

    Program

  • 7/28/2019 Intro Sept 1 Introduction to embedded systems and realtime systems

    13/21

    Embedded Systems

    7/16/2013 13

  • 7/28/2019 Intro Sept 1 Introduction to embedded systems and realtime systems

    14/21

    The Number Game (1)

    7/16/2013 14

    1 3 5 7

    9 11 13 15

    17 19 21 23

    25 27 29 31

  • 7/28/2019 Intro Sept 1 Introduction to embedded systems and realtime systems

    15/21

    The Number Game (2)

    7/16/2013 15

    2 3 6 7

    10 11 14 15

    18 19 22 23

    26 27 30 31

  • 7/28/2019 Intro Sept 1 Introduction to embedded systems and realtime systems

    16/21

    The Number Game (4)

    7/16/2013 16

    4 5 6 7

    12 13 14 15

    20 21 22 23

    28 29 30 31

  • 7/28/2019 Intro Sept 1 Introduction to embedded systems and realtime systems

    17/21

    The Number Game (8)

    7/16/2013 17

    8 9 10 11

    12 13 14 15

    24 25 26 27

    28 29 30 31

  • 7/28/2019 Intro Sept 1 Introduction to embedded systems and realtime systems

    18/21

    The Number Game (16)

    7/16/2013 18

    16 17 18 19

    20 21 22 23

    24 25 26 27

    28 29 30 31

  • 7/28/2019 Intro Sept 1 Introduction to embedded systems and realtime systems

    19/21

    Analysis

    What is theory /concept behind this game? How did I arrive at the number you guessed?

    How can I automate this process?

    What is the data and what is the algorithm?

    How can we convey these to a computingmachine?

    While a computer talks binary, we humans writeprograms in languages such as Java, C#, C++,Basic etc.

    Binary numbers (1s and 0s) is the number systemused by the computer systems.

    We humans use decimal number system that has 10distinct symbols (0,1,2,3,4,5,6,7,8,9)

    Your task: Write a C program to computerize this7/16/2013 19

  • 7/28/2019 Intro Sept 1 Introduction to embedded systems and realtime systems

    20/21

    7/16/2013 20

    1 3 5 7

    9 11 13 15

    17 19 21 23

    25 27 29 31

    2 3 6 7

    10 11 14 15

    18 19 22 23

    26 27 30 31

    16 17 18 19

    20 21 22 23

    24 25 26 27

    28 29 30 31

    4 5 6 7

    12 13 14 15

    20 21 22 23

    28 29 30 31

    8 9 10 11

    12 13 14 15

    24 25 26 27

    28 29 30 31

  • 7/28/2019 Intro Sept 1 Introduction to embedded systems and realtime systems

    21/21

    Summary

    We examined the course objectivesfor embedded and realtime systems

    We looked at sample systems

    Homework: Write a program that automates the

    number game

    Logo for NEXOS

    7/16/2013 21