Consider two processes P1 and P2 accessing shared variable ‘x’ and ‘y’ protected by two binary semaphores Sx and Sy respectively both initialized to 1. ‘wait’ and ‘signal’ denote the usual semaphore operators, where wait decreaments the semaphore value, and signal increments the semaphore value.
S1: P = Wait (Sx), Q = Wait (Sy), R = Signal (Sx) and S = Signal (Sx) may lead to starvation.
S2: P = Wait (Sy ), Q = Wait (Sy), R = Signal (Sx) and S = Signal (Sx) may lead to race condition.
Which of the following is true?