Consider for a moment the "Chainsaw-Wielding Killer" of your apparent nightmares. Assume, for a moment, a weight of approximately 8.3 lbs. (Roughly 7.4 lbs. for a lightweight chainsaw, another .9 lbs. for fuel, using the Stihl MS 192 C-E as a guide) – roughly twice the weight of a european bastard sword. Said killer could:
Wield the weighty weapon by the rear hand guard and handle, making his effective range arm length + a rough 2.5 feet (estimating 1 foot in length for the handle and motor, and 1.5 feet for the bar). I'm about 6', so assume and effective range of about 8.5' for a man my size. This would give greater range, but make the weapon clumsy and less easily controlled.
Wield the weighty weapon by both the rear hand guard and the center support handle. This would give greater control, but would remove roughly 2.5 feet from effective range - one foot from moving a hand up halfway down the saw, and a foot and a half (give or take) from your ability to extend your arms.
Clearly, the goal would be to harm you and not himself, so an average attacker might be expected to forego range in favor of control especially given such a heavy weapon, which would make scenario 2 our likely candidate.
Facing a Chainsaw
The nature of the weapon tells us two things:
The weapon is no more effective than a stone at a distance, as it cannot run without the trigger depressed.
It is most effective in a 1.5' range from the end of the bar to the motor.
These two being given, we can assume there are two relatively safe places to be. First, outside the effective range of the attacker; the second is inside the effective range of the attacker.
Rule 1: Cardio
If you happen to find yourself outside the effective range of the attacker, stay there. Your goal is to put distance between yourself and the attacker, preferably with impediment. Climbing over walls is going to be difficult while lugging an additional 8 lbs.
Learning to escape from an attacker is similar to escaping surveillance: you have to be willing to do what the other person is not. Climbing up high only to jump off of a building can buy you time, if you know how to disperse the energy of the fall.
Moving into a public space is going to make it very hard for a chainsaw wielding killer to harm you. Not only is he going to look quite conspicuous, but he's also going to have a lot of trouble getting through a crowd while running with a chainsaw (it's a hinderance, not a help).
The techniques for fighting an attacker with a chainsaw are the same for fighting an attacker with a sword, but likely easier. Getting inside the bar will put you inside the range of the chain. Examples would be:
As the attacker raises the chainsaw to slash down, follow him in and push up on the handle as you continue to drive through, letting the excess weight carry him backward. Alternately, take the handles, pull down as you turn to throw the attacker.
If he lunges to drive the chainsaw forward, lunge forward on a 45° angle to move inside, and keep close. Attack to the head to drive the chin upward to carry him back.
Leap backward to avoid a slash across the abdomen, move to the outside to attack.
If you find yourself wrestling for the chainsaw, remember that resistance has a direction, push until he pushes back then pull to imbalance.
If you find yourself in this situation, you are likely going to die. That said, whatever you do is correct and you should not worry about technique. Your best approach is to do whatever comes instinctually naturally to you, and to push yourself to act. The only wrong move is not to move.