RTOS Concepts Flashcards

(6 cards)

1
Q

What problems does RTOS solve?

A
  • Task scheduling
  • Timing precision
  • Concurrency
  • Resource sharing
  • Predictability
  • synchronisation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Tasks vs threads

A
  • both are concurrent process
  • threads are managed by the operating system
  • task is high-level and managed by a runtime environment
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is priority inversion?

A

When a low-priority task is blocking a high-priority task
- priority inheritance is used to fix it

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

Mutex vs Semaphore

A

Mutex: exclusive resource locking.
- A thread or a task locks the mutex before going into a critical section
- unlocks the mutex when done indicating to other threads the critical section is available

Semaphore: signalling or counting; often used between ISR and task communication
- used for both synchronisation and mutual exclusion

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

What happens if an ISR takes too long?

A
  • starves other processes of processing time
  • system mis real-time deadlines, which can be fatal if the system has to meet hard real-time deadlines such as in safety critical systems
  • cause miss processing of interrupts
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do queues work?

A

Tasks or ISRs can put data into queues and you can communicate that queue to other tasks

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