Real-Time Embedded Systems (Scheduling) Flashcards

1
Q

What is a real-time system?

A
  • information processing activity which has to respond to externally generated input stimuli within a specified period otherwise risks severe consequences, including failure
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How is the correctness of a real-time system based on?

A
  • correctness of outputs

- timeliness

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Difference soft and hard deadline?

A
  • hard: when not meeting deadline, results in a catastrophe

- soft: any other deadline (does not cause harm when not met)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a reactive system?

A
  • continuous interaction with the environment (as opposed to information processing)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a safety-critical system?

A
  • a failure may cause injury, loss of lives, significant financial loss
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is an embedded system?

A
  • computer system encapsulated in its environment
  • combination of hardware and software
  • dedicated to a specific purpose
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

When designing a digital process controller the sampling time T plays an important role. Elaborate on the size of T.

A
  • smaller T approximates analogue behavior better
  • but smaller T requires more processor-time and better ADC hardware
  • hardware must guarantee that all conversions and processing is possible in time T
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Approaches: Real time vs. best effort?

A
  • best effort = low average time

- real time = predictability, bounded worst case time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the Worst-Case-Execution-Time (WCET)?

A

Upper bounds of execution times of all tasks (must be known at compile time)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Define Predictability

A
  • Correctness of prediction of system’s state
  • one of most important requirements of ES
  • in modern processors harder to achieve (caches, pipelines, branch prediction, interrupt handling, priority inversion of tasks..)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

When is a schedule said to be feasible?

A
  • if all tasks can be completed according to a set of specified constraints (ie. deadlines)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

When is a set of tasks said to be schedulable?

A
  • if there exists at least one feasible schedule
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Define Release-time and Execution-time of tasks

A
  • Release-time: time at which task becomes ready for execution
  • execution-time: time necessary for executing task without interruption (in real-time systems only WCET matters)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is slack-time?

A
  • maximum time a task can be delayed on its activation to complete within its deadline
  • slack time = deadline - release time - execution time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is lateness?

A
  • represents delay of task completion with respect to its deadline
  • if task completes before deadline, lateness is negative
  • lateness = finishing time - deadline
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Define Start-time and Finishing-Time

A
  • Start-time: time at which task starts its execution
  • Finishing time: time at which task finishes its execution

(dont judge, this card is just for reasons of completeness)

17
Q

Define Static and Dynamic scheduling algorithms

A

Static: Scheduling decisions are based on fixed parameters, assigned to task before their activation

Dynamic: Scheduling decision are based on dynamic parameters that may change during execution

18
Q

EDF Scheduling Algorithm? Optimal?

A
  • Earliest Deadline First
  • aperiodic tasks (and also periodic in some cases)
  • priorities based on deadlines (earliest highest prority)
  • arbitrary arrival timesof tasks
  • independent tasks (ie. no precedence constraints)

Guarantee: If a set of tasks has a feasible schedule, then EDF will schedule these tasks so they complete by their deadline
And schedule is optimal with respect to minimizing maximum lateness

19
Q

Modified EDF Scheduling Algorithm?

What is modified ?

A
  • EDF*
  • with precedence constraints
  • turns a set of dependent tasks J into a set of independent tasks J*
  • Apply EDF to J*

Modified can be following:
- release times -> tasks must not start execution ealier than minimum finishing time of its predecessors and its own release time ri=max(ri , sum(ri-1+ei-1))
From start to end!
- deadlines -> tasks must finish execution time within its deadline and task must not finish execution later than maximum start time of its successor di
=min(di, (di+1-ed+1))
From end to start!

20
Q

RM Scheduling Algorithm?

A
  • Rate Monotonic Scheduling
  • periodic scheduling for inependent tasks
  • no precedence constraints
  • deadlines equal periods
  • smallest period equals highest priority
  • static priorities
21
Q

DM Scheudling

A
  • Deadline Monotonic Scheduling
  • same as RM but deadlines can be different from periods
  • tasks with shorter deadlines have higher priorities (relative deadlines)
22
Q

What is the scheduability test (for EDF)?

A
  • assume a list of job which already has a feasible schedule [Jobs j1, j2, j3]
  • a new job arrives at time t with execution time c
  • if the finish time of already scheduled tasks + execution time of new task is smaller than the deadline it is scheduable
23
Q

Pros and Cons of EDF?

A
Pros:
- simple and works nicely in theory
- simple scheduability test
- optimal
- best cpu utilization
Cons:
- difficult to implement in practice. Not very often adopted due to Dynamic priority assignment
- non stable: if any instance fails to meet dealine the system is not predictable, any instance of any task may then fail
24
Q

How is the CPU Utilization U defined? What means U<1 and U>1?

A

U = E / P

  • > ratio of period and execution time E
  • set of tasks adds up all Utilizations sum(Ui)
  • U <= 1 does not imply scheduability, depends on algorithm (for EDF it is always scheduable)
  • U > 1 (overload) some task will fail to meet deadline (always)
25
Q

Scheduability test for RM?

A

U <= n*(2^(1/n) - 1) with n is number of tasks
- U converges to 0.69 with n -> infinity
utilization is smaller than scheduable boundary it is scheduable with RM. Otherwise a clear maybe.

26
Q

Pros and Cons of RM?

A
Pros:
- simple to understand
- easy to implement, static prority assignment
- stable though some of the lower priority tasks fail to meet deadlines others may meet deadlines
Cons:
- lower CPU utilization than EDF
- requires D=P
- only deals with independent tasks