Ramon van Handel <[EMAIL PROTECTED]> wrote:

> I believe we shouldn't use the timer at all.
> Either we use direct access to framebuffer memory
> (DOSEMU full-screen driver or X DGA (needs special
> drivers in guest)) or we have the GUI clone() itself
> (or use pthreads ?) and have screen updating
> asynchronously in a separate thread.

Well, first of all the problem was not related to VGA
emulation, but to processing of X events, and maintaining
the keyboard queue.  All these tasks are triggered from
the global timer signal.

To screen emulation specifically:  whether we do it 
asynchronously using signals or a thread is really
no difference as to performance on UP machines.  
(The only difference is that by using sched_yield you tie 
yourself to the host OSes scheduler quantum length, while 
using a timer you can select the update frequency yourself.)

Using synchronous updates instead of async ones may be 
even slower: there can be a *lot* of accesses to the video 
memory, and causing a full VM switch for every byte written
might well be much slower than just reading the whole
thing say 50 times a second.  (Getting just a 'modified'
bit from the monitor might be helpful, though.)

Bye,
Ulrich

Reply via email to