Pro lesson · Preview
Queues & Inter-Task Communication
Passing data between tasks safely: a kernel queue is a thread-safe blocking FIFO (copy-by-value), the RTOS producer/consumer pattern that replaces shared-global-plus-mutex with message passing.
23 min read
This lesson is part of Pro
Upgrade to unlock the full lesson and the complete interview Q&A.
Unlock with Pro5 interview questions on this topic
Each one opens a full worked answer.
Why use a queue instead of a shared global protected by a mutex?What are the copy semantics of a FreeRTOS queue, and when do you send a pointer instead?How do you pass data from an ISR to a task?What goes wrong if you queue a pointer to a local variable?Besides queues, what inter-task communication primitives does an RTOS offer, and when would you use them?
This is just the start
Sign up free to track your progress through this course, mark lessons complete, and work through the full interview Q&A.
More in RTOS & Real-Time Concepts
Bare-Metal vs RTOSTasks & the SchedulerPreemptive vs Round-Robin Scheduling
Context Switching
Mutexes & Semaphores
Priority Inversion