I'm in the design phase of a program that will have 10-30 threads, where each thread will process many small blocks of information.
I have the option of each block sleeping for 5 ms or not sleeping at all. I should choose whichever reduces load on the CPU.
Normally I would sleep to reduce CPU utilization, but I am concerned that many 5 ms sleeps may, because of context switching, cause CPU utilization to increase rather than decrease.
Are there any studies already done on the trade off between short sleeps and context switching on CPU utilization?