Dynamic kernel stack allocation

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
FlashBurn
Member
Member
Posts: 313
Joined: Fri Oct 20, 2006 10:14 am

Re: Dynamic kernel stack allocation

Post by FlashBurn »

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.
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?

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.
Post Reply