• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/33

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

33 Cards in this Set

  • Front
  • Back

What is Real-Time Systems?

Real-Time Systems is one which the correctness of the system depends not only on the logical result of computation, but also on the time at which results are generated


"Misconceptions of Real-Time Computing"

Properties of Real-Time Systems?

  • Strict timing constraints
  • Application-specific design
  • High-reliability

Design phase of Real-Time Systems?

  1. Specification
  2. Implementation
  3. Verification

Examples of application constraints?

  • Timing constraints
  • Exclusion constraints
  • Precedence constraints

What is timing constraints?

A task must complete its execution within given time frames


e.g. task periodicity or deadline

Where timing constraints come from?

  • Laws of Nature
  • Mathematical theory
  • Component limitation
  • Artificial derivation

Criticality of constraints?

Hard


  • non-critical
  • critical
  • safety-critical


Soft

What are critical choices during design time?

  • Application software
  • Hardware architecture
  • Run-time systems

How we verify the system?

Ad-hoc testing


Let the system runs for a while then let the absence of failures prove the correctness



Exhaustive testing


Verify all the combinations of input data, time and faults



Formal analysis


Using proof machine and schedulability analysis

Run-time system shared resources are?

CPU Time


Memory Pool


I/O Device Access


Data Structure (Table, Buffers, ...)

Application-program shared resources are?

Displays


Data Entities


Data Structure

Resource classification & operations?

Classification


  1. Exclusive
  2. Shared


Operation


  1. Acquire
  2. Release

How to make acquire non-blocking?

Let acquire returns a status code that indicates whether the resource is available or not

Problems with resource management?

  • Deadlock
  • Starvation

How to avoid starvation?

Granting an access in FIFO manner


Dynamic priority depends on waiting time

Conditions for deadlock to occur?

  1. Mutual exclusion
  2. Hold and wait
  3. Non preemptive
  4. Circular Wait

Hardware level mutual-exclusion method?

Single Processor


Disable-Interrupt



Multi Processor


Atomic Instructions (test-and-set lock)

Implement semaphore in C!

  • object should receive an initial value
  • object should have wait and signal methods
  • methods should support call-back functionality


WAIT(s)


if s > 0 then:


...s := s-1


else


...block()



SIGNAL(s)


if there is blocked tasks


...allowBlockedTask


else


...s := s+1



What causes component faults?

Specification faults


  • incomplete
  • lack of techniques

Component faults


  • manufacturing defects
  • wear and tear

Environmental effects


  • high stress
  • electromagnetic/elementary-particle rad

Types of faults?

Permanent - total failure of component


Transient - temporary malfunction


Intermittent - repeated occurrences of transient

How errors are handled at run-time?

Error detection


erroneous data/program behaviour is detected



Error correction


originally data intended is recovered



Fault masking


hide erroneous data

Consideration for fault-tolerant real-time system?

  1. What is fault model used?
  2. How should the model implemented?
  3. What scheduling policy should be used?

Cause of message delay in network?

OVERHEADS


  • formatting
  • queueing
  • medium
  • notifying (at receiver)
  • decoding

Cause of queueing delay?

corresponding time slot (FlexRay)


transmission token (Token Ring)


contention-free transmission (Ethernet)


network priority negotiation (CAN)


removal from priority queue (Switch Ethernet)

How can you draw synchronous network comm?

And for asynchronous network?

How is the message transmitted onto medium?

Contention-free communication


dedicated time slot, one sender for one line


e.g. FlexRay, TTP/C, TTCAN



Token-based communication


utilize a token for the arbitration of the turn


e.g. TokenRing



Collision-based communication


used for retransmission and identifier


e.g. Ethernet, CAN

How CAN protocol works?

  1. each node is waiting until bus is idle
  2. node with highest priority send first
  3. identifier first, then MSB to LSB in order
  4. check the recessive bits, '1' to '0', if different then it's not transmitting highest-priority msg
  5. node that transmit identifier bit and pass number 4, then continue transmit the body

How do we verify the RTS?

SCHEDULABILITY Analysis

Two steps of Schedulability Analysis?

Introduce an abstract-model


e.g. task model, processor, run-time model



Predict whether tasks meet time-constraint


e.g. WCET, timing-correct abstract model

How do you facilitate schedulability analysis?

Concurrent and reactive programming


+ thread & object enabled


+ WCET should be derived from entities (objects)



Deterministic task execution


+ time tables with task priorities


+ preemptives task execution


3 basic states of run-time model are?

1. Waiting


2. Ready


3. Running

Different type of tasks?

Periodic task


- arrive at time interval Ti



Sporadic task


- arrive at time interval ≥Ti



Aperiodic task ~ not applicable on hard RTS


- intermittent periodicity