Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!snorkelwacker.mit.edu!bloom-beacon!deccrl!news.crl.dec.com!shlump.nac.dec.com!pa.dec.com!bacchus!mwm From: mwm@raven.relay.pa.dec.com (Mike (My Watch Has Windows) Meyer) Newsgroups: comp.sys.amiga.programmer Subject: Re: How do we change the scheduler? (Was Re: Multitasking at home...) Message-ID: Date: 14 Jan 91 20:11:49 GMT References: <17210@cbmvax.commodore. <1991Jan10.130741.11570@ux1.cso.uiuc.edu> Sender: news@pa.dec.com (News) Followup-To: comp.sys.amiga.programmer Organization: Missionaria Phonibalonica Lines: 31 In-Reply-To: lrg7030@uxa.cso.uiuc.edu's message of 10 Jan 91 13:07:41 GMT In article <1991Jan10.130741.11570@ux1.cso.uiuc.edu> lrg7030@uxa.cso.uiuc.edu (Loren Rittle) writes: Couldn't we decide to not use the real-time facilities of AmigaOS, and replace the dispatcher with one that "ages" tasks, ala UNIX, like ``every multitasking OS [mike has] worked with [now including AmigaOS].'' According to Tim Holloway in his lastest article in the Jan. Byte, ``Exec gives good performance with a simple time-slice dispatching algorithm. More complex custom algorithms can be attached in a straightforward manner, if required.'' I can't see an easy way to do aging. Others on the net have claimed it can be done; I'd be interested in knowing how (no code, just a description). The problem is that aging should be done based on how much CPU a process has gotten (recently, at that), not how old it is. The Amiga exec doesn't (to my knowledge) collect stats on this. So you have to add hooks to do that. Normally, this is done by having a scheduler that keeps track of such information. The best I can see doing on the Amiga is choosing a regular, always present interrupt, and putting code in that to keep track of how many times it interrupts each task. This requires a bit of magic, but is doable. Given the information on how "old" a process is, aging processes can indeed be done as a script. Getting that information is the tricky part.