This article from the Daily Telegraph (U.K.) describes a study done by MI5, Britain's equivalent of the FBI. The study finds that, in the U.K., the stereotypes of terrorists as immigrants, young unmarried males, and highly religious are incorrect. Apparently terrorists are more likely to be U.K. citizens, equally likely to be married with kids, and showing the entire range of religiosity, from highly to not much. Most were employed in low level jobs.
The tone of the article said that the authors were surprised about the trouble-makers not fitting the stereotype. They were surprised; I wasn't. Ever since September 11, 2001, I have held the view that it isn't particularly religious fervor that motivates Islamic terrorists. We learned this from post hoc analysis of the behaviors of the 9/11 perpetrators in the weeks and months leading up to the attack. Their behaviors in many cases were not at all those of devout Muslims.
If not "sexual frustration" as the article says, or religious fervor, then what? I suspect that it is the often inferior status of Islamic peoples in this globalized world, a low status that conflicts mightily with the exalted status to which their culture/religion tells them they are entitled. This view ties in with the "low-grade jobs" which the article reports almost all U.K. terror suspects held.
If your culture teaches you that you are one of nature's noblemen, fated to rule, whereas the world treats you like rubbish, this is likely to cause cognitive dissonance, anger, and possibly a predilection to suicidal violence, aka "going postal." Identifying a cause is not the same as identifying a solution, I'm fresh out of solutions to Islamic terrorism.