An the pilot's job would be to remain behind the locked cockpit door while landing the plane as quickly as practical, with a gun ready in case someone tries to break into the cockpit.
If terrorists start slashing people's throats, they are going to have all the passengers against them. Four terrorists armed with knives might be able to fatally injure a dozen or so people before being subdued, but the numbers would be so vastly against the terrorists the carnage would be limitted.
More significantly, I don't think a terrorist attack which was fought off--even with loss of innocent life--would have nearly the psychological impact on the country as one which wasn't, even if the latter resulted in fewer innocent casualties.