The group I DM for has never had a problem with knowing when to run away. From past experience they know I'll let them enter into situations where any one of them could be killed. Whether they escape a situation once 'engaged' is entirely up to their preparedness, cleverness, and whether I think it's a good idea for them to escape or not
As for the determinant for escape I agree with ForceUser. A contested roll with appropriate modifiers lets you get back to the action without killing the scene's momentum. Works great for me.
I think the problem the majority of DM's have with their players not knowing when to run away is due to the mechanics of D&D itself. Even low-level characters have little to fear when it comes to weapon damage. It's the 'does he jump the fence or not?' problem: a relatively low-level character is cornered by three or four members of the local militia at the end of an alley. The only means of escape is to jump the 7-foot fence the PC is standing next to. The militia moves in, crossbows leveled.
Does the PC jump the fence? OF COURSE HE DOES. He has 27 hit points! Odds are that even if he's hit, he can make it over the fence without being killed. This thinking colors almost every decision the character makes in a dangerous situation. There's no real belief by the player that the character might die, so there's no tension/drama to the situation.
Throughout the campaign the DM is forced to come up with handicaps ad nauseum so similar situations have the required tension or effect. And forgettaboutit if the PC is high-level. He laughs heartily and slaughters the militiamen in a round or so...or hops the fence knowing full well that if every militiaman hit he'd still probably live.
My solution was to switch the campaign over to the
Grim-n-Gritty Hit Point and Combat Rules
In the above example (Under the GnG rules) the high-level fighter can still slaughter the lowly militiamen but there's a halfway decent chance they'll kill or seriously injure him in the process. So--does he still jump the fence?
Maybe...maybe not. Do you feel lucky, punk? Drama/tension/etc achieved.
Of course, this makes your game much more lethal. But dramatic situations took on the appropriate 'weight' and it made my players a WHOLE lot smarter in a hurry. They learned to work effectively together as a team, and a lot more emphasis on drama and realistic npc interaction followed. Not to mention a lot more fun.