By Jakob Engblom
A while after I woke up my laptop today, I realized that the fan was pretty noisy. That typically indicates that the processor is working busy on something, and then I spotted Simics in the task bar. Checking in on that Simics showed that it was indeed running, and pausing it did lower the load on machine to the point that the fans calmed down. Turned out that while I was doing other things, Simics had been busily simulating away on one of my cores. Indeed, it had simulated what was almost a complete year.
This was achieved in about 4 hours and 20 minutes of host time. Simics was moving time forwards about 1800 times faster than real time. Just how can that be?
Simple - idle optimization, also known as hypersimulation. This old Power Architecture model was simply sitting at prompt, doing nothing. When a target does nothing, Simics can simply jump ahead in time to the next interesting event (a device interrupt or timer interrupt, typically) it knows about. The key to making this work is that all Simics devices that perform input or output talk to the outside world through Simics-provided virtual IO systems and never talk directly to the host. This gives the Simics simulation kernel the information it needs to perform good hypersimulation.
Having a target doing nothing might seem like a rare case, but in practice it is pretty common. For example, if you have a network or rack of target machines, only a few are typically active unless you manage to inject a very heavy load. On a multicore device, many programs only make use of one or a few cores. In both these cases, hypersimulation virtually makes the other machines and cores go away in terms of performance - almost all simulation time can be spent on the active units of the simulation, increasing performance many times compared to slogging through each and every cycle on each and every target processor.
There are also systems that are mostly idle per design. Sensor networks is one such example and long-running space missions another. Often, such systems wake up for an instant to check on the world, and then sleep for 99% or so of their time. In this case, hypersimulation enables you to speed up time 1000-fold and run through scenarios that just cannot be tested on physical hardware since it would take just as much real time - and who would sit around for five years watching a hardware mockup?