STACK MODE BRAINS EXPLAINED



The Bastard Book @ plan9.org


Stack Mode is important. This point cannot be overstressed. Managers live by it, your job is affected by it, and it's a lot more prevalent than people think.


So what is "Stack Mode"?
If you've done classical computing, you'll have learnt about Stacks. Or, if you're one of those poor bastard reverse left-handed Polish Rotation-Notation Calculator users, OR you're a postscript programmer, you'll have played with it. The calculator example is the easiest to work with tho. Say you want to add a couple of numbers. Using one of these calculators, you type in the first number, and hit enter. This puts the number on the stack, and is called PUSH-ing in geeky terms. (The opposite of this is POP-ing something off the Stack).
So your Stack looks like this:
First Number
Nothing
Nothing
Next, you type in the second number, and press enter. Your Stack now looks like this:
Second Number
First Number
Nothing
Now you press the ADD key. Your Stack now looks like:
TOTAL of First and Second Numbers
Nothing
Nothing

The two dangers of Stacks are Underflow and Overflow.
Underflow is like if you were to type in ONE number, then press ADD. ADD the first number to what? There's no other number on the stack. Error!
Overflow is the worst. Overflow is when too much data is PUSHed onto the stack. I.e. In the above example, our stack is three items in size. When you try and put a Fourth number into the stack, an Error occurs. Depending on the Stack Implementation, this can be a really bad thing. SOME stacks will remain in place, but POOR IMPLEMENTATIONS lose everything - the stack is obliterated, or filled with garbage.


What's this go to do with Managers?
Glad you asked. Managers, like a lot of people, are Stack Brained - only more so. People, when confronted by a term they do not understand in conversation, PUSH the term onto their stack to ask about later. Too many terms and their Stack has a minor error and randomly throws away the new term and/or one or more of the Stack contents.
Managers on the other hand have a poor stack implementation and a low number of items, which means technical conversations usually lose them quite early on.
IMPORTANT NOTE: Stack Overflow results in data Corruption E.g:

Tecchy: "There seems to be a problem with the handshaking protocol of the modembank"
Manager: Uh-huh

Manager's Stack:
Handshaking Protocol?
Nothing
Nothing

Tecchy: "Meantime we'll also need to look at Distributed Filesystems to provide Locational Obfuscation"
Manager: Uh-huh Uh-huh

Manager's Stack:
Locational Obfuscation?
Distributed Filesystem?
Handshaking Protocol?
Notice: (a) the words "Uh-huh" are used to signal a successful stack operation, and (b) The Manager's stack is now full. We're in the danger zone. All it takes now is one unknown to enter the conversation, and it's all over...

Tecchy: "Your wife bears a striking resemblance to a member of the Babboonus Uglius Genus"
Manager:

Manager's Stack:
***OVERFLOW***
***OVERFLOW***
***OVERFLOW***

Notice how the successful stack operation signal was not generated. Notice the Stack Contents. This is a temporary stack, which is replaced almost instantaneously (in Manager Brain time scales - 1 or 2 seconds to you or me) with:


Manager's Stack:
Babboon Filesystems
Is it lunchtime yet?
Locational Handshaking

Here concludes the lesson on Stack Based Managers. You now know the risks.

Special Note: Sometimes, in a particularly nasty overflow, the corruption will extend to the Run-Queue and the Manager's Brain will execute the Instruction BTE - that is, Branch To Elsewhere
Extra Special Note: There is a known bug in the BTE Instruction in the Manager Chipset, in that it doesn't take an address parameter. Noone knows where it goes, but whereever it is, it stays there. The Manager will most likely have to be rebooted by kicking the "SEAT UP/DOWN" lever of his/her wheely chair.

Good Luck.


Home of BOFH 2000 & 2001 + BOFH Merchandise!