[uae] Re: Another CPU usage problem

  • From: Jochen Becher <jochen_becher@xxxxxx>
  • To: uae@xxxxxxxxxxxxx
  • Date: Mon, 28 May 2007 15:54:22 +0200

Am Sonntag, den 27.05.2007, 10:08 -0400 schrieb Richard Drummond:
> Hi Jochen
> 
> On Friday 25 May 2007 11:23:22 Jochen Becher wrote:
> > I believe that all this interrupt handling, threading and STOP code
> > idle-loop is something we should reassign. In AmigaXL we used real
> > signals for interrupts from CIA, file system, blitter, VSYNC etc. The
> > STOP code did a real idle (wait for signal) and all I/O threads were
> > moved one nice level higher than the main uae thread. That gave us very
> > low CPU usage on idle Workbench (less than 5% on a 700 Mhz Laptop) and
> > very responsive uae (o.k. it was hosted on QNX which is a realtime
> > system).
> >
> > Maybe we could implement something similar in E-UAE?
> 
> Can you provide more detail on how this might work? Doing CIA, blitter 
> emulation, etc. in separate threads will create a lot of overhead.
> 
> Cheers,
> Rich

We didn't invent threads for CIA or blitter. The thread of the file
system raised a signal if it replied to a message. Some timer events
also raised a signal. So did VSYNC. But blitter did not (that was wrong
in my original mail). On STOP the emulator failed into a real sleep
(after checking some conditions if some special hardware handling has do
be done). Finished file system code, VSYNC or timer events broke the
sleep() and the interrupts were handled.

Of course AmigaXL was not a 100% hardware emulator (even ECS did not
really work). We focused on having a fast AmigaOS. And QNX was very fast
on thread handling and signal processing. Maybe that's not possible with
Linux or Windows.

Regards, Jochen



Other related posts: