Risk management in fno

suppose in futures market A goes long and B goes short. Later B is liquidated due to marginal call, but now there is no C who is there to buy the position of B.
So technically the exchange is holding on to a losing trade and does not have enough funds to Pay the further gains of A.

How is this risk managed? this question becomes inherently important while trading illiquid options. please explain

The broker will try to liquidate the short position of B. If there is no buyer, the position stays open with B.
It is upto the broker to recover the money from B.
Exchange will not buy the contract from B just because there was a margin call.