As a retired former K9 officer, please let me say NEVER RUN FROM A DOG, NEVER, NEVER, NEVER!!!
Stand your ground and put ANYTHING you can find between you and the dog, even if all you can find is a tree, use your belt and swing it buckle-end at the dog, trash can lids are great shields, open umbrellas confuse the hell out of them, chairs (think lion tamer) sticks, anything between you and the dog. SCREAM at the dog in your most commanding voice, as a last resort wind your jacket up around your weak hand and forearm and let the dog hit it, then slash from underneath the dog's throat with your pocketknife and kill the bastard. If you don't have a knife, use your jacket wrapped forearm and let the dog bite, then pin the dog's neck from the top with your strong forearm and fall directly on top of the dog with all your weight snapping the dogs's neck. You'd be surprised how easily even an "Attack Trained" police dog can be killed by a human bare handed if the human knows what they are doing.
Most stray dogs are not malicious, they're just looking for some excitement and ANYTHING THAT RUNS FROM THEM IS PURE EXCITEMENT TO A DOG!!! Even if the dog was not intent on harming you at first, the "thrill" of the run will leave him with one thing on his mind once he runs you down AND HE WILL. DO NOT RUN FROM A DOG (can't say that enough).