handling thread priorities - (how) is it possible?

Hi!

Please let me ask:

We have a code having N threads (no data sharing between them), and those threads have different priorities. These threads may start at different times.

Is it possible (to implement easily) to give priorities to these threads somehow, and have the highest priority thread “pause” processing a lower priority?

We want a new thread with higher priority able to pause an already running lower priority thread, in order the new high priority thread finishes in time.

Thank you in advance,
csaba

With the current architecture of CUDA this is impossible: threads are executed in blocks, and blocks are executed in a grid. Each thread has equal priority and each block has equal priority. There is no guarantee in which order they will be executed.