User Tools

Site Tools


anecdotes:not_expected_to_understand_this

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revisionBoth sides next revision
anecdotes:not_expected_to_understand_this [2016/01/12 10:31] – created wktanecdotes:not_expected_to_understand_this [2016/01/12 10:32] wkt
Line 1: Line 1:
 ===== /* You are not expected to understand this */ ===== ===== /* You are not expected to understand this */ =====
 +
 +(taken from Dennis Ritchie's [[https://www.bell-labs.com/usr/dmr/www/odd.html|home page]])
  
 Every now and then on Usenet or elsewhere I run across a reference to a certain comment in the source code of the Sixth Edition Unix operating system. Every now and then on Usenet or elsewhere I run across a reference to a certain comment in the source code of the Sixth Edition Unix operating system.
Line 9: Line 11:
 It's often quoted as a slur on the quantity or quality of the comments in the Bell Labs research releases of Unix. Not an unfair observation in general, I fear, but in this case unjustified. The actual code and other commentary surrounding it were precisely this: It's often quoted as a slur on the quantity or quality of the comments in the Bell Labs research releases of Unix. Not an unfair observation in general, I fear, but in this case unjustified. The actual code and other commentary surrounding it were precisely this:
  
-<code>'' /*+<code> 
 +    /*
      * Switch to stack of the new process and set up      * Switch to stack of the new process and set up
      * his segmentation registers.      * his segmentation registers.
Line 34: Line 37:
      */      */
     return(1);     return(1);
- '' 
 </code> </code>
-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.+ 
 +  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.
anecdotes/not_expected_to_understand_this.txt · Last modified: 2022/07/08 09:22 by 192.99.0.24