I'm trying to cause the computer to lockup, without creating an endless loop.

I'm writing a program that will try to shut down a process that has pegged the CPU. I don't want my program's process to peg the CPU though, for testing purposes.