Explain the concept of priority inversion and how you would mitigate it in a real-time operating system (RTOS) used in Roku devices.