G. Gordon Lidy discussed this issue. I believe he covered it in his book WILL. When he was held in the DC Jail. General Population he was confronted with multiple threats. He focused on a single individual. Before the thugs could attack he Went on the offensive, disabled the first attacker, started for a second and the covey scattered.
If you are swarmed there is not a lot you can do. If the attackers want to intimidate and work up to the attack then you have a chance.
Identify the leader, Move obliquely so as to limit the number of attackers facing you, start the ball by taking out the leader and go from there.
Survival is based on your will to survive, lack of hesitation and your tools.