Live data from Hacker News

Knuth's Challenge: Analyze everything your computer does in one second

gaxun.net

21–30 of 52 posts

Re: Knuth's Challenge: Analyze everything your computer does in one second

#22

The code running on the CPU isn't the only thing the computer is doing in that one second, the X86{,_64} opcodes we could capture aren't necessarily exactly what the CPU is doing, and code being run by extra controllers and processors isn't likely to be accessible to anyone but the manufacturer. In 1989, we'd've also been looking at code running on a single core with a single-task or cooperative-multitasking OS (for…

I think this could only be done from an outside perspective for any given unit of time (meaning e.g. somehow monitoring the actual physical state of every atom of a modern system) and could only be performed by other machines.

I think we've reached a sort of "chicken and egg" point in computing history where we can only understand any given device with the help of other machines, though not necessarily with AI or Machine Learning.

Maybe that sounds obvious, given that VLSI tools have been around for a long time, but I think the point is that there is no such thing is as full knowledge in this realm and we are already totally dependent on our computing devices to understand our computing devices.

It's an interesting thought - how would one implement this? I think the closest thing that comes to mind so far is the DARPA Cyber Grand Challenge work, some of which is open source (https://github.com/mechaphish) and a good starting point at the software level anyway, where the question was similar in some ways: describe what's happening in this code path at time t, but also take it a step further and generate a patch to fix a bug(s).

Re: Knuth's Challenge: Analyze everything your computer does in one second

#23
post #15

Earlier quoted context omitted.

> simpler hardware that an individual could completely understand Our hardware now is so much more complex, what has it gained us? The quick answer is performance, but is it true? What about correctness? Hard to prove either way, but my guess is we've gained a little bit on performance and lost on correctness.

My computer certainly does more than the one 27 years ago did, in the senses of operations it performs in a second, capacity of data storage, increased intercommunication options, increased selection of devices that I can interface with it, and so on. Some of these are just a change in magnitude, and the changes in the software are just as important as changes in the hardware. There are more parts of the computer (ag…

Personally, I like to occasionally remember that there's not a single computing device in my life I really own. It can be either a comforting piece of knowledge or a frightening one depending on your perspective. I like to take the former perspective.

Re: Knuth's Challenge: Analyze everything your computer does in one second

#24
Analyze all CPU instructions even for one second is very hard. Good place to start is Dtrace FBT provider - capture and analyze all called functions for one second.

Perhaps it will be some useless work, which should not be done at all. But CPU time is cheap and programmer's time is expensive.

Re: Knuth's Challenge: Analyze everything your computer does in one second

#25
post #23

Earlier quoted context omitted.

My computer certainly does more than the one 27 years ago did, in the senses of operations it performs in a second, capacity of data storage, increased intercommunication options, increased selection of devices that I can interface with it, and so on. Some of these are just a change in magnitude, and the changes in the software are just as important as changes in the hardware. There are more parts of the computer (ag…

Personally, I like to occasionally remember that there's not a single computing device in my life I really own . It can be either a comforting piece of knowledge or a frightening one depending on your perspective. I like to take the former perspective.

Ehhh. In a sense sure, but lots of people consider they've owned a loaf of bread without knowing Wonder's recipe.

Re: Knuth's Challenge: Analyze everything your computer does in one second

#26
post #23

Earlier quoted context omitted.

Personally, I like to occasionally remember that there's not a single computing device in my life I really own . It can be either a comforting piece of knowledge or a frightening one depending on your perspective. I like to take the former perspective.

Ehhh. In a sense sure, but lots of people consider they've owned a loaf of bread without knowing Wonder's recipe.

I see what you mean, but also no one ever owned a loaf of bread that could be cut, toasted and buttered remotely by a totally unknown 3rd party either...

Re: Knuth's Challenge: Analyze everything your computer does in one second

#27
post #26

Earlier quoted context omitted.

Ehhh. In a sense sure, but lots of people consider they've owned a loaf of bread without knowing Wonder's recipe.

I see what you mean, but also no one ever owned a loaf of bread that could be cut, toasted and buttered remotely by a totally unknown 3rd party either...

Unless you go to the local diner for breakfast and don't know the line-cook...

Re: Knuth's Challenge: Analyze everything your computer does in one second

#28
post #26

Earlier quoted context omitted.

I see what you mean, but also no one ever owned a loaf of bread that could be cut, toasted and buttered remotely by a totally unknown 3rd party either...

Unless you go to the local diner for breakfast and don't know the line-cook...

Good point. You walk into the diner implicitly trusting the line cook and the bread baker and so on. Very similar to the chain of trust implicit in the tech we use. Only I believe the chain of trust in the tech to be much longer and proven to have been repeatedly broken in recent decades. Also, line cooks have the luxury of tossing out loafs of bread that have moulded over.

Re: Knuth's Challenge: Analyze everything your computer does in one second

#30
"The computer will execute several hundred thousand instructions during that second; I'd like you to study them all."

That "several hundred thousand" has grown by about four orders of magnitude since then, even more if we consider multi-threading, GPU, CPUs in the network controller, etc.

Because of that, that task has become a lot more work. It is doable for 10^5-10^6 instructions (certainly for someone with Knuth's work ethic), but for 10^9-10^10 instructions, I guess even he would need to write tooling to do it.

A problem with tooling is that it may hide interesting behavior that the programmer writing the tooling isn't aware of in the 'misc' category of code executed. I fear that may defeat the purpose of this exercise.

Post reply on HN