If you want to put an immediate end to terrorist attacks the only way to do so is to ensure that there are people witnessing the unfolding events (so they know who are the good guys and who are the bad guys) and empower them to solve the problem right away. No matter how you slice it, you can't make 1 in 5 people permanent, paid police officers so you have to look at the citizenry. If you can't abide the idea of normal people carrying guns everywhere then you need to learn to live with the idea that the police can't be everywhere all the time, and that these are the risks you take regarding terrorism to feel safe from your fellow countrymen who you deem untrustworthy.