From: john Date: Sun, 2 Oct 2016 23:05:57 +1000 Subject: Knuth's Challenge This is an interesting problem to consider. The place to start I think is to figure out what information we would need to capture about the running system. At the lowest level, we would need to have a catalog of all the instructions executed and perhaps the register/memory/CPU cache contents. We might also need to record when the CPU performed context switches and the history of any interrupts that occurred during that second. We would also need to capture the list of processes running at each point in time during the second. I think basically what we would need is something that captured the full state of the system, each instruction executed and how each instruction changed the system state. It would be like a debugger for a programming language, but it would provide whole-system analysis/details. DTrace on steroids. Would we need the full state of the hard disk and the versions of all components installed for all applications to reproduce the results? I'm not sure if we have most of the necessary software written to capture each of these different info/state change flows. ========== From: Gaxun Date: Mon, 3 Oct 2016 22:18:23 -0500 Subject: Re: Knuth's Challenge Thanks for writing! > It would be like a debugger for a programming language, but it would provide > whole-system analysis/details. DTrace on steroids. I know there are emulators for a variety of systems, but I don't have much firsthand experience with them. I am guessing it would be fairly easy to fully emulate an 8086 system, for example. I don't think emulators for modern hardware would be able to accurately represent the real thing to the necessary degree. Could we maybe do it for a machine that was state of the art in 1989, though? > I'm not sure if we have most of the necessary software written to capture > each of these different info/state change flows. I have wondered about this as well. I was contacted by Laurent Malvert who shared some academic work he produced in around 2008. His Lemona system [0]. I didn't review it in detail, but I think it stopped at the syscall level. I'm not sure how you would go any lower. Thanks, Gaxun [0] https://github.com/laurent-malvert/lemona