My project has a practice of reducing the priority of the thread while writing to a file and changing it back after the write operation is complete. This is done because the file write operation could take up important resources, time and restrict other important threads from carrying on its tasks.
But, imagine my thread is running at a priority of 30. During the file write operation I change the priority to 5. Does this not mean that an other thread having a priority of 10 can block my thread which normally would have a priority of 30.
I understand that this sounds like priority inversion but during my study, a priority inversion scenario typically has a critical section involved but my scenario doesn't involve one. Our applications use RR scheduling policy but the operating system(QNX) uses both RR and FIFO. Any help is appreciated.