public inbox for linux-msdos@vger.kernel.org
 help / color / mirror / Atom feed
* Keyboard idle check eating resources
@ 2002-11-06  0:24 Cezar Cichocki
  2002-11-06  1:25 ` Bart Oldeman
  0 siblings, 1 reply; 3+ messages in thread
From: Cezar Cichocki @ 2002-11-06  0:24 UTC (permalink / raw)
  To: dosemu

Hello,


We are using few DOSEMu on one of the servers. They are working greate
however  they are consuming a lot of resources while sitting in the
"keyboard idle loop" (this is old code, wroten in Borland Pascal).

What can we do to improve performace?


regards,


-- 
Cezar Cichocki                            CYBER Service 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Keyboard idle check eating resources
  2002-11-06  0:24 Keyboard idle check eating resources Cezar Cichocki
@ 2002-11-06  1:25 ` Bart Oldeman
  2002-11-06 14:06   ` Maurilio Longo
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Oldeman @ 2002-11-06  1:25 UTC (permalink / raw)
  To: Cezar Cichocki; +Cc: dosemu

On Wed, 6 Nov 2002, Cezar Cichocki wrote:

> We are using few DOSEMu on one of the servers. They are working greate
> however  they are consuming a lot of resources while sitting in the
> "keyboard idle loop" (this is old code, wroten in Borland Pascal).
>
> What can we do to improve performace?

Two ways.
a) change your Pascal program to not use a construct such as
     while not keypressed do;
   if you cannot use a straight "readkey" (i.e. the program must do
   something in the loop) you can still release time slices by calling
   int2f/ax=$1680 for each loop iteration (IIRC in BP you can do that
   using "intr")

b) or get the development version 1.1.3 and patch up to 1.1.3.7
   (www.dosemu.org/testing) which automatically sleeps a little if the
   BIOS is asked whether a key is available and there is no key available.

and make sure that $_hogthreshold is NOT set to 0, but set to 1 (or some
higher value if 1 is too slow).

Bart


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Keyboard idle check eating resources
  2002-11-06  1:25 ` Bart Oldeman
@ 2002-11-06 14:06   ` Maurilio Longo
  0 siblings, 0 replies; 3+ messages in thread
From: Maurilio Longo @ 2002-11-06 14:06 UTC (permalink / raw)
  To: Bart Oldeman, dosemu

Hi Bart,

I've compiled 1.1.3 to change the way cpu cicles are released when asking time
of day (I'm using dosemu to run a clipper program which asks what time is it
when it has nothing to do, this is clipper runtime standard bahaviour) to
release less time, but there is a problem, right now dosemu sleeps for a
certain amount of time, but I don't want to sleep for a fixed time but release
the rest of my cpu slice!!

What is the correct API under linux to release the rest of my slice of cpu
time?

regards.



Bart Oldeman ha scritto:

> On Wed, 6 Nov 2002, Cezar Cichocki wrote:
>
> > We are using few DOSEMu on one of the servers. They are working greate
> > however  they are consuming a lot of resources while sitting in the
> > "keyboard idle loop" (this is old code, wroten in Borland Pascal).
> >
> > What can we do to improve performace?
>
> Two ways.
> a) change your Pascal program to not use a construct such as
>      while not keypressed do;
>    if you cannot use a straight "readkey" (i.e. the program must do
>    something in the loop) you can still release time slices by calling
>    int2f/ax=$1680 for each loop iteration (IIRC in BP you can do that
>    using "intr")
>
> b) or get the development version 1.1.3 and patch up to 1.1.3.7
>    (www.dosemu.org/testing) which automatically sleeps a little if the
>    BIOS is asked whether a key is available and there is no key available.
>
> and make sure that $_hogthreshold is NOT set to 0, but set to 1 (or some
> higher value if 1 is too slow).
>
> Bart
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
 __________
|  |  | |__| md2520@mclink.it
|_|_|_|____| Team OS/2 Italia



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-11-06 14:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-06  0:24 Keyboard idle check eating resources Cezar Cichocki
2002-11-06  1:25 ` Bart Oldeman
2002-11-06 14:06   ` Maurilio Longo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox