|
Post by steve on Nov 28, 2018 17:12:12 GMT 1
Hi Jos,
My application is left running on Windows workstations throughout each working day. When the program has been idle for some time it brings up a fairly unsophisticated screen saver (that just loops and every so-often writes either a blank or a character to a random part of the screen).
When the program was running on a dedicated DOS PC back in 1990's this was acceptable as there were no other tasks that could be performed on the workstation; But now it 'shares' the PC with other (Windows) applications it would be good if, instead of looping, it cooperated with the operation system by releasing the CPU either for a preset interval or until there was some keyboard/mouse activity within its window (i.e. an OS 'friendly' sleep() facility). Is this possible to achieve?
Any suggestions welcome, Steve
|
|
|
Post by Jos on Nov 28, 2018 17:21:05 GMT 1
The DOS program screen saver prevents vDos to release processor time back to Windows; the core utilization of vDos stays at 100%?
Jos
|
|
|
Post by steve on Nov 28, 2018 17:56:47 GMT 1
Hi Jos,
The CPU usage is showing between 40% and 50% for a dual processor workstation (i.e. the looping seems to take up practically 100% of a single CPU's bandwidth). When the screen saver is not running and the program is waiting for keyboard input the CPU usage goes down to 1% to 2%. I think you have answered my question ... A redeign of the screen saver is needed!!! Thank you.
Cheers, Steve
|
|
|
Post by Jos on Nov 28, 2018 18:47:34 GMT 1
The current version basically runs at 100% until it detects an idle situation, like the DOS program polling the keyboard or mouse. Probably the screen saver doesn’t do that frequent enough, so vDos stays at 100%.
The next version does a 180 degrees turn: It’s primary idle, until some event like disk access, key press, or mouse action puts it in high gear for some time (defined by the action). You could look if your program has an option to postpone or completely disable the screen saver.
Jos
|
|
|
Post by steve on Nov 29, 2018 10:28:26 GMT 1
Thanks Jos.
Please don't change the VDos idle strategy on my behalf. I can get round the problem by a redesign of the screensaver.
Steve
|
|
|
Post by Jos on Nov 29, 2018 10:38:24 GMT 1
Well, the idle strategy was already changed (for the new version) some months ago. Primary because vDos could actually switch to idle far too soon and frequent.
Jos
|
|