Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

polling (Announce)

posted by Ninho E-mail, 18.07.2011, 11:22

Mike, I wonder whether there isn't a little confusion over two notions :

- your DOS app might be running in concurrence with others under a multitasker such as Windows, OS2,or simply the DOS's DOSSHELL or similar multitaskers.
This is what I had in mind mostly when writing the previous note. Basically the solution is for an app to signal it's OK to idle by calling int 2F80.

- alternatively or in addition, your DOS itself might be running under a virtualisation system like VMWare, Virtual BOX etc. I think this is what /you/ had in mind, apology for miscontruing your question.
Then, the fact that an "inactive" VM seems to consume processor time is NOT a consequence of your app polling the virtual hardware, it is a general property of virtual machines running DOS. in order to "tame" the VM you could hook int 28, and inside your intercept you could issue HLT instructions. Idem for int 2F1680 as well as several others.

BUT this "taming" really shouldn't be installed by your (or any other) /application/ program, rather it should be /DOS system wide/ and is best done by specially tuned residents : load DOSIDLE and SLEEPVM into your DOS configuration - very recommended, look them up on the Internet (both are needed for best results as they complement each other. The latter specifically hooks int 28, the former a number of others). Net result, CPU utilisation instantly drops to zero, problem solved.

> If DOS calls INT 0x28 to indicate that it is idle (between keystrokes
> presumable) then it is perfectly reasonable for an application to do the
> same and for the same reason

Not really, it is not meant to be used in this way and will cause problems (with printers e.g.)

>> What int 2F/1680 is, is a DPMI/Windows/Task Switcher thing

> Ok, that explains why I need to test to see if it is enabled. On XP in a
> command window it is enabled, but it might not be available in on a pure
> DOS machine.

You don't have to test, at least as of DOS version 2, int 2F is a fundamental mechanism; you don't test for int 2F/1680 either, may call it blindly, can't harm in any way.

> So for machines with INT 0x2f installed I can test function 1680 once to
> see if it is working, and then make a decision on if to keep using it or
> not. If it is not available I think that INT 0x28 still makes sense,
> unless I am wrong with my reasoning above.

Calling int 28 would be wrong. See above.

Regards,

---
Ninho

 

Complete thread:

Back to the forum
Board view  Mix view
22778 Postings in 2122 Threads, 402 registered users (0 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum