Wow, this feels wrong way to do it. The way i see it, threads and processes waiting on some resource should be able to update some piece if metadata pointing to the thing they are waiting for. This will allow "donating" their priority and cpu share to the other process/thread.
This can be a general mechanism, which can be incorporated in the things kernel already know, creating a chain of dependencies and giving priority to something at the end of chain.