3 ms·
> it should be really easy to tell if any given process halts. But, it's not. In theory, some processes could run forever. In practice, they do not. For exampl
by musicale 4y ago
> it should be really easy to tell if any given process halts. But, it's not.
In theory, some processes could run forever. In practice, they do not. For example,
sudo shutdown -h now
usually works for me. If it doesn't then a hard powerdown usually does the trick.
What's perhaps a more interesting question is whether a process will produce its desired output within a desired time frame or number of cycles. For practical time frames an empirical approach seems easy (just wait and check it), but I have no reason to believe that an analytic approach or proof would be "really easy" even if it was just N steps of symbolic execution.
- jfoutz 4y ago> sudo shutdown -h now That, is funny. There are a bunch of approaches, one approach uses 'gas' so you have to pay for computation steps. A bunch of SAT solvers use a clock - if you don't finish in 5 minutes, you get the axe. And yes, for the vast majority - it's fine. shutdown -h works great. Not many bugs are from "the set of all sets that do not contain themselves" paradoxes. > What's perhaps a more interesting question is whether a process will produce its desired output within a desired time frame. Everybody sort of learns about thundering herd in their own way. And retry loops. And many more. We try stuff, learn how it fails and fix it. And, as far as I know, that's the best we can do. Thinking about programs as processes (I think the author means natural process not unix process) is helpful, but it's not a magic wand.