[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: VM02 v1.0 Released! April Fools???
On Mar 31, 3:04 pm, Andy McFadden <fad...@fadden.com> wrote:
> In comp.sys.apple2 DaveSchmenk <dschm...@gmail.com> wrote:
>
> > DESIGN.TXT:
> >http://vm02.cvs.sourceforge.net/viewvc/*checkout*/vm02/vm02/DESIGN.TX...
>
> Impressive!
>
> "Since the 6502 will be interpreting the Java bytecodes, I simply
> implemented a byte counter after each interpreted bytecode and call the
> scheduler when it reaches zero."
>
> Why every instruction? If you only check it on backward branches,
> method return, and exceptions, you are guaranteed that it will trigger
> eventually. You trade off a bit of predictability (in terms of how many
> instructions are actually executed before a context switch) but lose
> the overhead of updating a counter on every instruction. (Although I
> suppose that will also make timed-wait less accurate.)
>