From mboxrd@z Thu Jan 1 00:00:00 1970 From: lm@mcvoy.com (Larry McVoy) Date: Sun, 15 Jan 2017 19:15:10 -0800 Subject: [TUHS] Article on 'not meant to understand this' In-Reply-To: <20170116014444.GA32261@minnie.tuhs.org> References: <20170116014444.GA32261@minnie.tuhs.org> Message-ID: <20170116031510.GB6647@mcvoy.com> Yeah, saw it. I'm of the opinion that you aren't really truly an OS person unless you've written a context switcher. I wrote one for a user level threading package I did for Udi Manber as a grad student. I did most of the work in C and then dropped to assembler for the trampoline. It's really not that complicated, I think people make it out to be a bigger deal than it is. You're saving state (registers), switching stacks, and changing the return address so you return in the new process. Well, not that complicated on a simple machine line a VAX or a 68K or a PDP11. I sort of stopped playing in assembler when super scalar out of order stuff came around and I couldn't get the mental picture of what was where. On Mon, Jan 16, 2017 at 11:44:44AM +1000, Warren Toomey wrote: > http://thenewstack.io/not-expected-understand-explainer/ > > in case you haven't seen it yet. > > Cheers, Warren -- --- Larry McVoy lm at mcvoy.com http://www.mcvoy.com/lm