Well, Phaenx is certainly correct. Killing all Muslims would stop Muslim terrorism... Whether it's the right thing to do is another matter, of course.
A partial solution may be to force governments to take responsibility for their citizens. If you harbor known terrorists and refuse to stop them, you're in fact aiding them. Therefore, it is imperative that governments around the world work together to stop these morons. Of course, education and such also help.