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: