Keyboard idle check eating resources
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,
Signature · 1 line
Cezar Cichocki CYBER Service
Quoted 5 lines · Cezar Cichocki
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
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:
Quoted 23 lines · Cezar Cichocki
Quoted 6 lines
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 aswhile 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).
Quoted 6 lines
Bart
-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
__________
| | | |__| [email protected] |_|_|_|____| Team OS/2 Italia