Funnily enough(?), prison overcrowding is in the news here right now. Let's hope they don't resort to these extreme measures.
There's a Neal Stephenson book where dead people can be uploaded to a digital world by slicing up their brains and reading what is in them.
You did remind me of this:
It's a little creepy, I know. Black humour is what I thought to but the ending is weak.