Concluding the above comments:
S1 is 2PL which can be seen easily in Fig.1.
The main problem is in the step that I have marked in the Fig.2 for schedule S2, which is that whether we can apply lock on X where it is applied in transaction 3. According to me, I have seen no such restriction, therefore S2 should be 2PL. If anyone knows anything about this, please do share in the comments.
Here S1 is under 2PL.
For S2 there is two possibility where it violates the 2PL property.
First possibility is
# : Here in transaction T2 of S2, to write on Y we have to apply exclusive lock on Y but we can not do that as we have already applied shared lock on Y during initial read on Y. So we can not apply exclusive lock.
Second possibility is
** : Here in transaction T2 of S2, we can apply exclusive lock on Y to read and write. But after applying this lock we can not apply lock on Y in transaction T3 to read Y.
Due to above condition S2 is not under 2PL.
So answer is option (C) Only S1 is allowed under 2PL.
S1: It satisfies 2PL