Assume you have two processes, P1 and P2. P1 has a high priority, P2 has a low priority. P1 and P2 have one shared semaphore (i.e., they both carry out waits and posts on the same semaphore). The processes can be interleaved in any arbitrary order (e.g. P2 could be started before P1).
Briefly explain whether the processes could deadlock when:
ii. both processes run on a Linux system as time sharing tasks
iii. both processes run on a Windows 7 system as variable tasks
iv. both processes run on a Windows 7 system as real-time tasks.
I think P1 and P2 can only result in priority inversion. According to one of the requirements of deadlock(Circular wait: there is a circular chain of two or more processes, waiting for a resource held by the other processes ), priority inversion is not equal to deadlock. Besides, P1 and P2 only have 1 semaphore, which means there will be no circular, so they will never cause deadlock. Therefore, all the answers will be no. Is that correct? If not, then what's the answer?