Re: Keyboard idle check eating resources

Maurilio Longo
2002-11-06T14:06:43Z

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