Honestly I seriously doubt any sort of "deterrent" will actually work. These are mentally insane people we are dealing with. You really think they're afraid of dying?
If you're going to shoot up a school/theatre/mall, you can't possibly expect to walk out of there alive.
Infact most of these incidents end with the shooter offing himself. They were very much prepared to die and just wanted to take as many with them as possible. So the whole threat of them getting shot just doesn't work. It's like threatening to shoot a suicide bomber.
Armed people on the scene will decrease the length and number of casualties in these incidents, but it won't decrease the number of incidents.