Eventually, I'd like to make my own CPU. Hopefully it could be Von Neumann, but there might be some reason why that's not possible.
The fundamental difference with this CPU is that it only cycles when it has data to process. This means that the kernel, the software, the drivers, would all need to be written in an event-driven manner. This CPU would rely highly on hardware interrupts, but there would be absolutely no work to be performed when the system is idle.
Let's say a piece of software needs to wait for 3 minutes. The kernel looks at the end of its scheduled wake-ups, and notices that 3 minutes is sooner than any other piece of software needs to wake up. It will then update the hardware timer to wait only 3 minutes, and ignore the previous timer it was running. Once the 3 minutes elapses, the kernel runs the piece of software that belongs to the topmost wakeup timer, removes that timer from the list, and tells the timer to wait $next_timer_length minus the 3 minutes it already waited.
IM clients would be rewritten to simply select() on the network interrupt. Games would be select()ing on the network interrupt, plus the keyboard and mouse, plus any timers that exist for objects currently moving onscreen. This means that if none of these datasources has woken up the CPU via an interrupt, the CPU has not done any calculations on game frames that are identical to the previous ones.
There are some devices which fundamentally do not operate like this yet. Real-time clocks, CRT displays, etc. For the rtc, it would simply be unavoidable to have the small timer circuit cycling constantly. For the graphics device, it would be necessary for the graphics card to bridge the event-driven nature of this CPU's graphical output, with a highly variable framerate, and the regular input cycles needed for a standard display device.
As you can hopefully see, I'm a bit too dumb to pull this one off. Still though, a man can dream.
Tracy - 2011-10-17 07:29:21
I was srieoulsy at DefCon 5 until I saw this post.
Muhammed - 2012-10-03 11:03:20
A nice story...it's my opinion that some of your best work is actlauly the sweeter more character driven stuff as opposed to the gutter-minded lunacy you're more famous for.One criticism is that I don't really think the parents arguing is required. I don't know, it just seems like a kind of drab depressing bit of reality in an otherwise nice bit of light fantasy for kids. Also the mom comes off as a giant bitch.I don't think the parents need or should be taken out entirely...but that part of the story could be reworked a bit.- Nate Birch