Given a pool of GPUs we check if a GPU is free by checking if no process is running on it.
The problem is that our process does not immediately require the GPU. Therefore there is a chance that two processes get assigned the same GPU.
Is it possible to lock / reserve a GPU for a specific process? Via shell?
The GPU should only be usable by the running process until it finishes, then the GPU should be free again.