3 ms·
It's not an upper bound either since the data saved on context-switch doesn't include the contents of the stack or data segment or other global process state. I
by nybble41 7y ago
It's not an upper bound either since the data saved on context-switch doesn't include the contents of the stack or data segment or other global process state. It's not sufficient to save and restore only the thread context.
One upper bound, mentioned in the article, would be the inputs fed to the program thus far and the total number of instructions executed. Another would be the current thread context plus all working memory and other process state, excluding any data which can be proven not to be accessed for the remainder of the program. Which of these is smaller would depend on the program and where it was stopped; at the beginning you just have a (small) counter and no inputs consumed, but then again you may have fed the program gigabytes of inputs and stopped it just before it returned a small amount of summary data.