anecdotes:not_expected_to_understand_this
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
anecdotes:not_expected_to_understand_this [2016/01/12 10:32] – wkt | anecdotes:not_expected_to_understand_this [2022/07/08 09:22] (current) – old revision restored (2016/01/23 10:38) 192.99.0.24 | ||
---|---|---|---|
Line 29: | Line 29: | ||
*/ | */ | ||
if(rp-> | if(rp-> | ||
- | rp-> | + | |
aretu(u.u_ssav); | aretu(u.u_ssav); | ||
} | } | ||
Line 39: | Line 39: | ||
</ | </ | ||
- | | + | So we tried to explain what was going on. "You are not expected to understand this" was intended as a remark in the spirit of "This won't be on the exam," rather than as an impudent challenge. |
The real problem is that we didn't understand what was going on either. The savu/retu mechanism for doing process exchange was fundamentally broken because it depended on switching to a previous stack frame and executing function return code in a different procedure from the one that saved the earlier state. This worked on the PDP-11 because its compiler always used the same context-save mechanism; with the Interdata compiler, the procedure return code differed depending on which registers were saved. | The real problem is that we didn't understand what was going on either. The savu/retu mechanism for doing process exchange was fundamentally broken because it depended on switching to a previous stack frame and executing function return code in a different procedure from the one that saved the earlier state. This worked on the PDP-11 because its compiler always used the same context-save mechanism; with the Interdata compiler, the procedure return code differed depending on which registers were saved. | ||
So, for Steve Johnson and me, trying to move the kernel for the first time to a new machine, this code was indeed on the exam. It took about a week of agonizing before we finally convinced each other that the mechanism was wrong and no fiddling with the compiler was useful. We redid the coroutine control-passing primitives altogether, and this code section, and the comment, passed into history. | So, for Steve Johnson and me, trying to move the kernel for the first time to a new machine, this code was indeed on the exam. It took about a week of agonizing before we finally convinced each other that the mechanism was wrong and no fiddling with the compiler was useful. We redid the coroutine control-passing primitives altogether, and this code section, and the comment, passed into history. | ||
+ | |||
+ | Also see [[https:// | ||
anecdotes/not_expected_to_understand_this.1452555142.txt.gz · Last modified: 2016/01/12 10:32 by wkt