Skip to contentSkip to conversation

Dosemu and clipper applications eating all CPU

DISCUSSION Stas Sergeev 3 participants 3 messages Mar 9, 2004 – Mar 10, 2004

lore
Share & tools
lore
#0 lore raw

Hello.

Quoted 2 lines · Maximiliano Curia

I'm trying to run a clipper program inside dosemu. It runs ok, but it eats all the CPU cycles when it's idle.

You haven't specified your dosemu version.

Quoted 2 lines

I've already tried changing the hogthreshold value, with no changes in the result.

You must keep that value to 1 - that's the most optimistic one.

Quoted 1 line

I've been told this is a known problem,

Problem of clipper I presume? If it just runs in a busy loop while idle, dosemu can't really help.

Quoted 2 lines

but I'm hoping it can be fixed
in some way.

You can assign a lower priority level to dosemu process, see nice/renice commands. That will help as to not crawling the system any more.
You can also try the patches from here:
https://sourceforge.net/tracker/index.php?func=detail&aid=716137&group_id=49784&atid=457450
They release the CPU cycles by making dosemu slower, which is perhaps also not what you really want.

The real solution (if it exists) can be found if you trace your program with dosdebug, see what it really does when idle, and think about adding the appropriate heuristic to dosemu to catch that case (but it already catches most of the common "idling" cases).

#1 lore raw
Quoted 3 lines · Stas Sergeev

Problem of clipper I presume? If it
just runs in a busy loop while idle,
dosemu can't really help.

That is exactly the problem. On NT/XP systems, there is a third-party program called TAMEDOS which intercepts the busy loops and does something so that the CPU is free but the application does not slow down. I have no idea how it works. Clipper was written in the early 80's when there was no problem for a program to take over the CPU... I know at least one of the loops is a constant keyboard poll: "Is anyone pressing a key yet? What about now? What about now?" hundreds of times a second.

-------
Peter B. Steiger
Cheyenne, WY

#2 lore raw
In reply to Stas Sergeev

Hola Stas Sergeev!

El 09/03/2004 a las 23:16 escribiste:

Quoted 3 lines
Quoted 2 lines

I'm trying to run a clipper program inside dosemu. It runs ok, but it eats all the CPU cycles when it's idle.

You haven't specified your dosemu version.

Now I'm using dosemu 1.2.0 and 1.2.1, previous versions do the same.

Quoted 4 lines
Quoted 2 lines

I've already tried changing the hogthreshold value, with no changes in the result.

You must keep that value to 1 - that's the most optimistic one.

I have it set at 1.

Quoted 4 lines
Quoted 1 line

I've been told this is a known problem,

Problem of clipper I presume? If it just runs in a busy loop while idle, dosemu can't really help.

Yes, that dosemu doesn't detect the clipper idle calls.

Quoted 6 lines
Quoted 2 lines

but I'm hoping it can be fixed
in some way.

You can assign a lower priority level to dosemu process, see nice/renice commands. That will help as to not crawling the system any more.

It still eats the cpu, with nice -n 19, but now the 60% is marked as nice.

Quoted 5 lines

You can also try the patches from here:
https://sourceforge.net/tracker/index.php?func=detail&aid=716137&group_id=49784&atid=457450
They release the CPU cycles by making dosemu slower, which is perhaps also not what you really want.

This particular application doesn't have an speed requirement. So, it may be solution, although not a general one.

Quoted 7 lines

The real solution (if it exists) can be found if you trace your program with dosdebug, see what it really does when idle, and think about adding the appropriate heuristic to dosemu to catch that case (but it already catches most of the common "idling" cases).

I up to it now.
I'm trying to understand the freedos idle.

Signature · 3 lines
"UNIX is basically a simple operating system, but you have to be a genius to
understand the simplicity." -- (Dennis Ritchie)
Saludos /\/\ /\ >< `/