a) Mutual exclusion is not guaranteed;
initially both R1=free and R2=free
now consider the scenario,
P1 will start and check the condition (R1==busy) it will be evaluated as false and P1 will be preempted
then P2 will start and check the condition (R1==busy) it will be evaluated as false and P2 will be preempted
now again P1 will start execution and set R1=busy then preempted again
then P2 will start execution and set R1=busy which was already updated by P1 and now p2 will be preempted
after that P1 will start execution and same scenario happen again with both P1 and P2
both set R2=busy and enter into critical section together.
hence Mutual exclusion is not guaranteed.
here deadlock is not possible, because at least one process is able to proceed and enter into critical section.
if Q1 and Q3 ; Q2 and Q4 will be interchanged then Mutual exclusion is guaranteed but deadlock is possible.
here, both process will not be able to enter critical section together.
if P1 sets R1=busy and then preempted, and P2 sets R2=busy then preempted...
in this scenario no process can proceed further, as both holding the resource that is required by other to enter into CS.
hence deadlock will be there.