One way we might be able to make this a little closer to real life is to make it exponentially increase and linearly decline. I would also make it more of an inclination to emigrate, since unhappy thoughts would cause people to go berserk, melancholy, etc. -- which always results in death in a pre-Sheriff fortress. While I can see some people killing themselves if a bunch of their friends and co-workers die, most people are collected enough to get on with their lives. Thus, no matter how many people were killed, it'd probably be best to have unhappiness affect only a few dwarfs a month. The rest would simply become dissatisfied with their safety and consider quitting or changing jobs.
There would essentially be two pools: "danger points" reflect the number of dwarves that have been killed recently and reflect the immediate threat of being killed while on the job. "Worry points" reflect the lingering distrust that dwarves gain for the given situation.
When a dwarf is killed on the job, the given profession receives one danger point. Then, the given profession receives (two to the power of the number of danger points minus one) (mathematically: 2^(dp-1)) in worry points. [edit]The base of this exponent (2) is quite obviously very high and would probably be modified down to some floating point value during testing. E.g., 1.2 makes for a considerably-shallower increase.[/edit]
For instance:
If you kill one dwarf, you gain one danger point and worry point.
If you kill two dwarves, you gain one danger point for the first and 2^0 (1) worry point, and one danger point for the second and 2^1 (2) worry points, for a total of three worry points.
If you kill sixteen dwarves, you gain 16 danger points, one for each, and you gain 1+2+4+8+16+32+64+128+256+512+1024+2048+4096+8192+16384+32768 worry points, for a total of 65,535 worry points... [edit]fixed 32768 typo (was 32668)[/edit]
Every month, you lose one "danger point" and one "worry point". Thus, in the case of a sixteen-miner-massacre, it'd take hundreds of years for miners ever to want to work there ever again.
Various schemes and nobles could be used to decrease the worry points, such as increasing wages to the given profession, offering reparations, etc.
[ June 03, 2007: Message edited by: JT ]