linux scheduling problem
Hello,
In my application, there are several threads sharing one bus. I used a mutex to protect the bus. One of the thread is control thread which has the highest priority. I know that the lower priority thread which locked the mutex will block the higher priority thread. This delay is acceptable for me. My question is: after the lower thread unlock the mutex, will the higher priority thread guarantee to get the mutex among other waiting thread? I suppose the unlock will move all waiting threads to the running queue, then they're scheduled based on the priority. If I understand correctly, my higher priority thread will be the first one to get the mutex after it's unlocked, even there are lower priority threads starting to wait for the mutex earlier than it.
Thanks
lordofring
|