Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.forth Subject: Re: polyForth multitasker question Date: Fri, 14 Apr 2017 14:55:25 -0700 Organization: A noiseless patient Spider Lines: 12 Message-ID: <87a87ihcxe.fsf@nightsong.com> References: <2ef60cba-5577-4813-ae93-3946cd4b415b@googlegroups.com> <877f2ql73h.fsf@nightsong.com> <8760i9jf0d.fsf@nightsong.com> <91b82032-d469-47a8-8586-b7dfc4dc42ec@googlegroups.com> <46d8a45d-99b8-4f48-a011-f08d4de9e918@googlegroups.com> <8737dcixu5.fsf@nightsong.com> <87vaq7hg4l.fsf@nightsong.com> <87r30vgzd2.fsf@nightsong.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="2da47fe0d5b67678d95728b8b035ff3d"; logging-data="26210"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+jTrJgpD0wG7uYted1uhxR" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:u97RCHai8Rm9AwFgEBCeMKV8VCQ= sha1:eUvvjWGK9F/4b8jdJ7o/VsIT0Rc= Xref: csiph.com comp.lang.forth:57329 rickman writes: > the remaining part of the code can be handled by the scheduler waking > a process on a periodic basis.. The point is the scheduler really > shouldn't be getting in the path of interrupts other than the > scheduling timer. There is no need and it just complicates things. Why wake a process on a periodic basis if nothing is happening? Example: an entry keypad on a door, that gets used a few times a day. There's no reason to burn power waking up every few msec to see if a button has been pressed. Instead, pressing a button raises an interrupt that wakes up the scheduler, which then figures out which task is waiting on the button press.