From: nobody AT nowhere Newsgroups: comp.lang.asm.x86,comp.os.msdos.djgpp,comp.os.msdos.programmer,comp.lang.pascal.borland,alt.msdos.programmer Subject: Preemptive Multitasking under DPMI Date: Mon, 28 Oct 96 17:37:08 GMT Organization: LatNet news site Lines: 29 Message-ID: <5538hu$2ue@news.latnet.lv> NNTP-Posting-Host: 159.148.61.19 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp We are trying to understand reentrancy issues related to preemptive multitasking under DPMI. We've read the DPMI specs carefully, but things are not completely clear. We can see three multitasking schemes: 1) BETWEEN DPMI VIRTUAL MACHINES. This appears to be the way multitasking is intended in the DPMI specs. This is most likely how multitasking is done in Multiuser DOS schemes. We don't like this, because each multitasking object would have to have it's own copy of DOS, interrupts, etc. We are dealing with a real-time application were many threads will be alive at any time. 2) BETWEEN DPMI CLIENTS WITHIN A SINGLE VIRTUAL MACHINE. The DPMI specs clearly states that the only way to multitask clients is by passing the time-slice which means non-preemptive scheduling, so that doesn't appear as an option. 3) WITHIN A DPMI CLIENT BY A KERNEL LOCATED OUTSIDE THE DPMI HOST. This is what we want. Unfortunately the DPMI host doesn't know about context switching between tasks and it's not supported in the DPMI specs. The DPMI specs states that the host maintains *one* global host stack which makes it not reentrant. What we want to achieve does not seem possible without a reentrant DPMI host. Could we get some comments on this. Is the lack of reentrancy something inherent to all DPMI hosts, or are there DPMI host implementations which are reentrant. Is there source code available for DPMI server implementations which we might be able to modify to make it reentrant? Any help would be greatly appreciated.