This sounds like an assignment you aren’t will do to yourself ;-)

100US I’m up for it.

Note that the results of your graphs will actually display the behavior of the random function… The way you requirement are build, priority won’t have much effect simply because each thread will be sleeping 98% or the time (assuming shorted possible sleep time is 22ms and writing/reading to/from the queue should take less then 500us) . In fact I predict that modifying the priorities will have no significant effect. The main reason is that to have an effect each thread must want to run at the same time. Since they each have their own delay, the likely hood of them wanting to run a the same time is very very low.

I would not need to use MUTEX for threads. You can avoid it if there is only one writer and one reader (but then you could say in this case there is two readers)

In a nut shell you are going into a lot of trouble just to display the behavior of the random function ;)