For the worst-case you are right, but we code for the best and average-case and optimize for the worst case, aren´t we?OSwhatever wrote: Even for smaller jobs I tend to use mutexes. You often have the situation where you have nested locks and in this case mutexes do better. Often you have the situation where something might need memory from the page allocator, but you don't really know for sure.
The problem with mutexes is, that in the best case all operations take less time than a task-switch. So you would waste performance for the best- and average-case to get the most out of the worst-case. Maybe it would then be better to look for another algorithm so that the worst-case takes less time than before.