logoalt Hacker News

teddyh • yesterday at 9:42 PM • 1 reply • view on HN

When Digital Equipment Corporation (DEC) first created the PDP-11, it didn’t realize the mainframe was capable of things DEC hadn’t foreseen. The creators made it with a function that is very fast and has certain interrupt levels, so the function runs around saying, “Oh, I’m running, I’m running a Level 5 job and here comes a Level 7 interrupt. That’s okay, I’m more important. I’ll keep on working here. Oh my God! A Level 2 interrupt. This guy must really want me.” And runs up there.

“What do you want?” he asks.

And the program says, “Oh, ah, am I finished yet?”

“No!” he yells, then runs back down to Level 5 and says to himself, “Okay, fine. I can start again right down here. Oh, I’m finished. Oh! I have this little Level 7 interrupt that I guess I should look at. Oh oh! It says my terminal is free so I can print things on it. Okay, I’ll print such and such.”

There are certain higher levels of interrupt. If one interrupt hits the function as it’s running along, it says, “Oh my God! The line current has dropped to 109 volts! I bet somebody has just flicked the switch, and I’ve only got 329 nanoseconds before the whole system goes down. That’s okay. That gives me more than enough time to save all the registers, load them in the locations they should be in, this, that, and the other thing.”

So the function scurries around, does all this, says, “Ah! Whew, I’ve got a couple of nanoseconds, I guess I’ll wait here until, you know, I go to sleep.” So you flip off the switch and the thing is dead

When you flip the switch on the function jumps up and exclaims, “Oh my God! I’m over 109 volts. I must be on. Well, quick, load everything back up in the accumulators and start running again right where I was.”

— Karla Jennings, The Devouring Fungus: Tales of the Computer Age (1990), chapter 3, The Hacker’s Universe


Replies

antonvs • yesterday at 11:07 PM

Many PDP-11 models had magnetic core memory which didn't lose state on a power cycle, which is what allowed this to work. All that needed to be saved on shutdown was the quite small CPU state. Once machines switched to volatile memory, this was no longer possible.