RTOS
RTOS
Câu 2:
);
Câu 3:
Câu 6:
BaseType_t xTaskCreate( TaskFunction_t pvTaskCode,
UBaseType_t uxPriority,
TaskHandle_t *
pxCreatedTask );
Câu 7:
Câu 10:
Câu 11:
Th
at is an API function used to send data to the back of a queue.
In which, what is xQueue?
A. A pointer to the memory into which the received data will
be copied.
B. A pointer to the data to be copied into the queue.
(Đúng) C. The handle of the queue to which the data
is being sent (written).
D. The size in bytes of each data item that can be stored in
the queue.
E. The maximum number of items that the queue being
created can hold at any one time.
Câu 12:
Which of the following API functions are used in this code?
(example014: Sending and receiving on a queue from within
an interrupt)
(Đúng) A. xQueueSendToBack()
(Đúng) B. vTaskDelayUntil()
C. xTaskGetPriority()
(Đúng) D. xTaskGetTickCount()
(Đúng) E. xQueueReceiveFromISR()
F. xQueueSendToFrontFromISR()
G. vTaskDelay()
(Đúng) H. xQueueSendToBackFromISR()
Câu 13: What is the API function used to query the number of
free spaces in a queue?
A. xQueueOverwrite(QueueHandle_t xQueue, const void *
pvItemToQueue)
B. None of the others
C. xQueuePeek(QueueHandle_t xQueue, void *pvBuffer,
TickType_t xTicksToWait)
(Đúng) D. uxQueueSpacesAvailable( QueueHandle_t
xQueue )
E. uxQueueMessagesWaiting( QueueHandle_t xQueue )
Câu 14:
Câu 19:
Câu 26:
Câu 32:
Assume that for a single queue, there are more than one task
blocked on it waiting for space. What happens when another
task or interrupt reads data from the queue?
A. The task that is unblocked is always the task that has
been waiting the longest.
B. None of the others
C. The task that is unblocked is always the highest priority
task that is waiting for space.
D. The task that is unblocked is always the highest priority
task that is waiting for space and has the longest 'block' time.
(Đúng) E. The task that is unblocked is always the
highest priority task that is waiting for space and has
been waiting the longest.
Câu 39: Which of the following statements about semaphore
and mutex are NOT TRUE?
(Đúng) A. Mutex and binary semaphore are the
same.
(Đúng) B. After a mutex is created, if a task ‘take’
the mutex, it always goes into the blocked state.
(Đúng) C. After a counting semaphore is created, if a
task ‘take’ the semaphore, it always goes into the
blocked state.
D. After a binary semaphore is created, if a task ‘take’ the
semaphore, it always goes into the blocked state.
E. A counting semaphore with maximum count 1 and initial
count 0 can be consider as an binary semaphore.
Câu 40: What is the API function that specifies a time at which
the task wishes to unblock relative to the time at which it is
called?
A. void vTaskDelayUntil( const TickType_t xTicksToDelay );
(Đúng) B. void vTaskDelay( const TickType_t
xTicksToDelay );
C. void vTaskDelay(TickType_t *pxPreviousWakeTime, const
TickType_t xTimeIncrement );
D. None of the others
E. void vTaskDelayUntil(TickType_t *pxPreviousWakeTime,
const TickType_t xTimeIncrement );