Chapter 7 (partial) Flashcards

(14 cards)

1
Q

Why is performing complex processing directly inside an ISR discouraged in FreeRTOS?

A

It increases interrupt latency

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

What is the principle of priority-based preemptive scheduling in FreeRTOS?

A

The highest-priority ready task runs

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

When multiple tasks are always ready to run, how do priorities affect execution?

A

Higher-priority tasks run first

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

How does preemption improve system responsiveness compared to a super-loop?

A

Urgent tasks can interrupt others

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

What is starvation in an RTOS?

A

A task never gets CPU time

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

What is the role of the RTOS tick in scheduling?

A

It drives timing and context switches

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

What best describes a FreeRTOS queue?

A

A FIFO buffer for communication

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

What happens when a high-priority task tries to read from an empty queue?

A

The task enters the blocked state

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

What is the immediate scheduler behavior when a low-priority task sends data that unblocks a high-priority task?

A

The higher-priority task executes

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

What is the purpose of the xTicksToWait parameter in queue operations?

A

It defines how long a task may block

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

Why is a multiple-producer, single-consumer design commonly used in real-time systems?

A

It centralizes resource access

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

How can two FreeRTOS tasks communicate using a queue?

A

One task sends data to the queue and another task receives it

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

How can a hardware interrupt service routine (ISR) notify a FreeRTOS task that an event has
occurred using a queue?

A

By calling xQueueSendFromISR()

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

Which of the following statements most correctly justifies why only dynamic task creation is explicitly tested?
A. xTaskCreateStatic() can never fail because memory is allocated at compile time,
whereas xTaskCreate() can fail only if the heap is fragmented.
B. xTaskCreate() introduces runtime uncertainty due to dynamic memory allocation, while
xTaskCreateStatic() eliminates this uncertainty by externalizing memory management to
the application.
C. xTaskCreateStatic() is evaluated at link time and never returns an invalid handle, unlike
xTaskCreate(), which depends on the scheduler state.
D. xTaskCreate() must be checked because it creates a task before the scheduler is
started, whereas xTaskCreateStatic() creates the task after vTaskStartScheduler().

A

B. xTaskCreate() introduces runtime uncertainty due to dynamic memory allocation, while xTaskCreateStatic() eliminates this uncertainty by externalizing memory management to
the application

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