Electronic – Replacement for Queues in RTOS

rtos

For Inter-task communication or to share data between two tasks of RTOS, We use Queues.
But Problem with Queues is that they are slow…. They copy data in Buffer then Mutex Handling and then Data Transfer. It's irritatingly slow if you have to transfer large data.
Another problem is if same queue is accessed by Multiple tasks. Then Picture becomes like this:- First Wait to get access to The Queue then Queue internal Mutex Handling then Data Transfer.

This increases overhead on the system. What could be the Efficient replacement for Queues?

(I guess this question is Independant of RTOS we use. Most of the RTOS handle Queues in this way only)

Best Answer

Queues operate that way because that is a thread-safe transaction model for inter-task communication. You risk data corruption and/or ownership issues in any less-stringent scheme.

Are you copying the data into a buffer in memory then passing a pointer with the queue elements, or trying to pass all the data in the queue elements themselves? If you're not passing pointers then you'll get an increase in performance doing that instead of passing one byte at a time through queue elements.