This whole hiring-firing thing is too complicated to capture in a small post as this, but one of the simplest thing I have realized over the last year is this - do something above average if you want to be treated above average - make yourself indispensable - make yourself valuable - do something that makes your peers and bosses remember your face when they compile a list of people who are to be fired (that will be one step towards ensuring that you are not on that list).
As much as organizations want to reduce costs by laying off a bunch of people, they are also aware that they need to be highly efficient when things aren’t as bright as usual - this requires that they NOT layoff their efficient employees (well unless they want to shut down completely .. but that’s a different ball game in itself).
The point is that if you want to be treated as a “special” employee, you have to first ask yourself if you are doing anything “special” for your employer. It’s a very simple thing, but you will be surprised how many people don’t get it. They will come 15 minutes late everyday - spend an hour in the break room everyday - talk about kids and football for about an hour everyday - browse the internet for a couple of hours everyday - leave 15 minutes early everyday - leave an hour earlier on every Friday - and then they will act all surprised and cry foul when they get the pink slip.
Another thing to realize is that most of the bigger corporations hire with some degree of redundancy in mind (especially when the times are good and there is a lot of money flowing around). This means that some of your peers are capable of doing the exact things that you are capable of - now, when it comes to choosing who should stay and who should go, don’t expect to be safe unless you have done something more valuable that your peers.
The message is simple - do average, get average - do special, get special. Don’t just make it a habit, make it a lifestyle.