Originally Posted by patyogesh
so which values should i use corrosponding to following priorities?
and if windows have these Predefien Macros corrosponding to thread priority values, doesn't Linux have the same kind of Macros?
1. It is absolutely ridiculous to think that a priority value in one system would map to a priority value in another system with the same effect; one (of numerous) contributing factor is the mechanics of the system's scheduler. On top of that, priority values must be set according to individual situations in order to achieve the desired performance. In applications where the priority does in fact matter, you cannot simply set a value and presume that is the correct value for different situations.
2. I can only guess that MS has defined those macros as some sort of guide to programmers; the names themselves have no special meaning whatsoever. As I have already mentioned, priorities need to be set on a case-by-case basis and the behavior depends on the implementation of the scheduler. In reality there is no guarantee that your software will meet requirements on a particular system even if you always requested the highest priority, so setting fixed priorities does not make sense. What would make sense is to test at runtime if requirements are being met and to escalate priority as required; keep in mind that it is possible that requirements cannot be met due to other circumstances such as high load.