Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: rbowman Newsgroups: comp.os.linux.misc Subject: Re: The First 8 Commands Every New User Should Learn Date: 9 Nov 2025 20:15:37 GMT Lines: 24 Message-ID: References: <10egfns$mkr3$1@dont-email.me> <10ekkb3$1pge1$7@dont-email.me> <10enr65$2mn0d$1@dont-email.me> <18761ba08442cf82$13364$3324025$802601b3@news.usenetexpress.com> <10eo9uo$2r7qh$1@dont-email.me> <10eof4k$2rsga$10@dont-email.me> <10eq30i$392o0$2@dont-email.me> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net HmQfw5nBZQvO0TaQfrPQow28Um7tKar5y8iN0d182nNTSFM/QO Cancel-Lock: sha1:DSo+ZGvXkKQcpRakukROJz/eS/0= sha256:CczLWsULbj993ye22EDeJ/XzgSuqEskDzlnBG0gn50Q= User-Agent: Pan/0.162 (Pokrosvk) Xref: csiph.com comp.os.linux.misc:77195 On Sun, 9 Nov 2025 12:55:46 +0000, The Natural Philosopher wrote: > On 09/11/2025 05:31, c186282 wrote: >> Hmmmm ... are nix/Win 'services' just working off >>   a deep down time/event trigger or are they ISRs ? >>   My guess is the former, ISRs can be a bit weird sometimes - did >>   plenty of those with microcontrollers. > > Haven't you written any? > > Every process in *nix is 'interrupt driven' in that it gets its share of > CPU time via the (timer) interrupt driven scheduler. > > Most device drivers will take hardware interrupts, service them as > quickly as possible and flag a main task that they need to wake up and > do the rest. For Windows services it's assumed you'll play nice. For example some of the services we use are waiting for information to arrive on a socket and use a select statement with a one or two second timeout. If nothing is happening it will sometimes do a little housekeeping. The important thing is the timeout in the main loop. Without it you have something that's going to try to use 100% of the processor(s).