Path: utzoo!attcan!uunet!know!news.cs.indiana.edu!iuvax!bomgard From: bomgard@iuvax.cs.indiana.edu (Tim Bomgardner) Newsgroups: comp.os.msdos.programmer Subject: Re: Increasing #task switches per second (> 18.2), help Message-ID: <78060@iuvax.cs.indiana.edu> Date: 13 Dec 90 19:25:10 GMT References: <4348@dnlunx.pttrnl.nl> <31600011@hpcvra.cv.hp.com.CV.HP.COM> Organization: Indiana University, Bloomington Lines: 35 In article <31600011@hpcvra.cv.hp.com.CV.HP.COM> everett@hpcvra.cv.hp.com.CV.HP.COM (Everett Kaser) writes: }/ levericw@cheetah.ece.clarkson.edu (Walden Leverich) writes... } > bomgard@iuvax.cs.indiana.edu (Tim Bomgardner) writes: }>Tim> filetp@dnlunx.pttrnl.nl (Peter Filet) writes: }>Tim> >I am developing an Operating System, in the Protected Mode of the i286 }>Tim> >processor. }>Tim> > (wants a faster system clock) } }>Tim> want, say, a 4X clock rate (72.8/sec), you call the original handler every }>Tim> fourth tick. The rest of the OS has no idea anything has }>Tim> changed..... } }>Very interesting. But wrong. Considering that your interrupt timer }>will be called once every 1/18.2 seconds. Now if your pass that tick }>onto the OS every fouth time, then the OS gets 1/4 of the clock *NOT* }>4X the clock. } }It WILL work, what was left out of the explanation is this: after you take }over the interrupt vector, you have to reprogram the timer to interrupt }4 times as often. THEN, you only pass every fourth one on to the regular }interrupt service routine, maintaining the original frequency for the original }interrupt service routine, but quadrupling the frequency for yourself. } My apologies for leaving out this critical bit of information. The 8254 counter is easily programmed for the desired clock rate, 72.8/sec in this example. }>Tim> Academic types can usually tell you why you can't do something. }>Tim> Commercial software developers can usually tell you how to do it }>Tim> anyway :) } }>Academic types in the CompEng field will explain why it is impossible. } Like I said... :)