Basic Concepts Flashcards

1
Q

What is real-time systems?

A

A real-time system is a system that reacts to events in the environment by performing predefined actions within specified time intervals.

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

What the “time” part of real-time means?

A

The correctness of the system depends not only on the logical result of the computation but also on the time at which the results are produced.

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

What the “real” part of real-time means?

A

It indicates that the reaction of the systems to external events must occur during their evolution. As a consequence, the system time (internal time) must be measured using the same time scale used for measuring the time in the controlled environment (external time).

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

Which are the three real-time tasks categories?

A
  • Hard: if producing the result after deadline may cause catastrophic consequences on the system under control.
  • Firm: if producing the result after its deadline is useless for the system, but does not cause any damage.
  • Soft: if producing the results after its deadline has still some utility for the system, although causing a performance degradation.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Cite examples of hard real-time tasks.

A

Safety-critical systems tasks:

  • sensory data acquisition;
  • data filtering and prediction;
  • data fusion and image processing;
  • actuator servoing;
  • low-level control of critical system components;
  • action planning for systems that toghtly interact with the environment.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Cite examples of firm real-time tasks.

A

Networked applications and multimedia systems tasks:

  • video playing;
  • audio/video encoding and decoding;
  • on-line image processing;
  • sensory data transmission in distributed systems.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Cite examples of soft real-time tasks.

A

Tasks related to system-user interactions:

  • the command interpreter of the user interface;
  • handling input data from the keyboard;
  • displaying messages on screen;
  • representation of system state variables;
  • graphical activities;
  • saving report-data.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The correctness of the result in real-time systems depends on…

A

value and its time of delivery.

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

Speed of real-time system depends on…

A

environment and nature.

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

When real-time is needed and standard computing can’t attend the demand?

A

When fast processing, average and performance testing are not enough, and the worst case needs guarantees. Be on time, all the time and proof it.

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

What are the basic proprieties of real-time systems should have?

A

Timeliness (result correct in time), predictability (the consequences of systems behavior should be predictable for any scheduling decision), efficiency, robustness, fault-tolerant, maintainability.

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

Which is the temporal definition of a periodic task?

A

Temporal definition of periodic tasks:

  • Ti = period of task i
  • Ri = release time, relative from start of period time at which task i may start to execute
  • Di = deadline interval, relative from start of period time at which task i must be completed
  • Ci = worst case execution time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Define utilization.

A

Utilization is a portion of CPU used by the execution of a task set.

Ui = Ci/Ti

Utilization of a task set is the sum of all individual tasks utilization.

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

What is active task?

A

It is a task that can potentially execute on the processor independently on its actual availability.

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

What is a ready task?

A

Task ready is a task waiting for the processor.

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

What is a running task?

A

Running task is a task in execution.

17
Q

What is preemption?

A

Preemption is the operation of suspending the running task and inserting it into the ready queue.

18
Q

What is the importance/advantages of preemption?

A
  1. Tasks performing exception handling may need to preempt existing tasks so that responses to exceptions may be issued in timely fashion.
  2. When tasks have different levels of criticality (expressing task importance), preemption permits executing the most critical tasks as soon as they arrive.
  3. preempting scheduling typically allows higher efficiency, in the sense that it allows executing a real-time task sets with higher processor utilization.
19
Q

What are the disadvantages of preemption?

A

Preemption destroys program locality and introduces a runtime overhead that inflates the execution time of tasks.

20
Q

What is a feasible schedule?

A

A schedule is feasible if all tasks can complete meeting their constraints (ex. deadline).

21
Q

What is a schedulable task set?

A

A task set is schedulable if there exists at least one algorithm that can produce a feasible schedule.

22
Q

What is a feasible task set?

A

It does not exist. There are feasible schedule or scheadulable task set but no feasible task set.

23
Q

Which is the necessary schedulability condition?

A

U <=1
If it does not hold, it is not schedulable.
If it holds, it can or cannot be schedulable.

24
Q

What the Graham Theorem says?

A

If a task set is optimally scheduled on a multiprocessor with some priority assignment, a fixed number of processors, fixed execution times, and precedence constraints, then increasing the number of processors, reducing execution times, or weakening the precedence constraints can increase the schedule length.

25
Q

Shows an example of scheduling anomalie

A
J1(3)           J9(9)
J2(2)         J8(4) [depends on J4]
J3(2)         J7(4) [depends on J4]
J4(2)         J6(4) [depends on J4]
                J5(4) [depends on J4]
Three processors: optimal schedule
  • increasing number of processors: 4 processors -> schedule length increases
  • computation times reduced: reduced by 1 unit of time -> schedule length increases
  • precedence constraints weakened: remove precedence on tasks 7 and 8 -> schedule length increases
26
Q

What is schedule?

A

Schedule is an assignment of a given set of tasks to the

processor, so that each task is executed until completion.

27
Q

What is the difference between necessary and sufficient schedulability condition?

A

Necessary condition: If it does NOT hold, the task set is not schedulable. If it holds, we can’t say anything. It can or cannot be schedulable.

Sufficient condition: If it HOLDS, the task set is schedulable. If it does not hold, we can’t say anything. It can or cannot be schedulable.

28
Q

What is the difference between fixed and dynamic priority scheduling? Explain them.

A

Fixed Task Priority Scheduling: each task has its own priority and it is the same during its lifetime.
Dynamic Task Priority Scheduling is when tasks priorities may change during their lifetime.

There are two types of Dynamic task priority, as follows:

  1. Fixed Job Priority: jobs of one task may have different priorities, but each job has single fixed priority.
  2. Dynamic Job Priority: Job priority may change over time.
29
Q

What is the decision mode on First Come First Served (FCFS) algorithm? Which job has the highest priority?

A

The decision mode is non-preemptive

  • ———————–|(———–)—————————–> t1
  • ——————————|—–(——-)———————> t2
  • ———————————|————(—)—————> t3
  • ———————————-|—————-(———-)—> t4

Highest priority job is the one which has been longest in ready queue.

30
Q

What is the decision mode on Round Robin (RR) algorithm? Which job has the highest priority?

A

The decision mode is preemptive

  • —————-|(–)(–)—-(–)——-> t1
  • ———————-|—(–)———> t2
  • —————————|——(–)-> t3

All jobs have the same priority.

31
Q

At which point in time does the scheduler select the next executing job for non-preemptive scheduling?

A

There are no jobs in the ready queue: at job release.

There are jobs in the ready queue: at job completion.

32
Q

At which point in time does the scheduler select the next executing job for preemptive scheduling?

A

There are no jobs in the ready queue: at job release

There are jobs in the ready queue:

  • at job release
  • at job completion
  • timer event (e.g. RR, offline scheduling table…)