Here is a basic premise that was told to me before I went travelling that proved good to keep in mind:
If somebody really wants to get into your bag, you're not going to be able to stop them.
What you can do, however, is discourage them. Assuming you're not leaving your bag out in the road unattended for several hours, all you have to do is be discouraging enough that an opportunist will grab someone else's bag instead of your own. (This is true for all sorts of situations: if someone is looking for trouble on a darkened street, are they going to make it with the woman in trainers aware of her surroundings and the other people on the street, or with the one who's in heels, a bit drunk and listening to music on her mp3 player?) It's about not making yourself a target.
To that end, there are several methods you can use to stop your bag being the one targetted. Some backpacks come with a wire mesh woven into the fabric that is designed to stop someone from slashing into it with a knife. Some come with padlocks to stop people from undoing the zip. When I went travelling, I bought a cheap length of metal chain and coupled it with a basic padlock. I wound it tightly around the backpack in the aim of stopping people getting into the bag and if there was an object in the room that I could secure it to I did that as well which stopped people from running off with it.
As I said at the start, it's not going to stop people who are really determined but hopefully it will be enough of a deterrent to stop you from being targetted.