NT VDM questions

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
Post Reply
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

NT VDM questions

Post by Troy Martin »

I hope someone out there can help me with these questions about the NT Virtual DOS Machine.

1. a) Does each VDM instance have it's own IVT?
b) Can a VDM instance modify the IVT it uses for the duration of the instance?

2. Would the BIOS be able to be accessed via the interrupts like if the program was booted off a floppy etc.?
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Re: NT VDM questions

Post by Colonel Kernel »

I don't have definite answers for your questions, but I can offer some educated guesses:
  1. Shared IVT: I assume each VDM would need its own IVT so as not to interfere with other VDMs. Each VDM lives in its own address space.
  2. Modify IVT: Not sure, but probably yes, since some DOS software would depend on this.
  3. BIOS: Interesting question... NT VDM probably emulates the BIOS. In fact, I forget whether NT VDM uses V8086 mode or not. I don't think so, which means there would be a lot of emulation going on.
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: NT VDM questions

Post by jal »

Colonel Kernel wrote:In fact, I forget whether NT VDM uses V8086 mode or not. I don't think so, which means there would be a lot of emulation going on.[/list]
Of course it does. What makes you think otherwise?


JAL
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: NT VDM questions

Post by jal »

Troy Martin wrote:1. a) Does each VDM instance have it's own IVT?
Yes. Basically its own instance of the entire 1MB memory space, or you'd get one instance messing up another.
b) Can a VDM instance modify the IVT it uses for the duration of the instance?
Of course. Or many DOS programs would not run at all.
2. Would the BIOS be able to be accessed via the interrupts like if the program was booted off a floppy etc.?
Of course. DOS programs rely heavily on the BIOS. Of course, much is emulated, either at BIOS or hardware level (or both).

Wikipedia has a decent overview.


JAL
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Re: NT VDM questions

Post by Colonel Kernel »

jal wrote:
Colonel Kernel wrote:In fact, I forget whether NT VDM uses V8086 mode or not. I don't think so, which means there would be a lot of emulation going on.[/list]
Of course it does. What makes you think otherwise?


JAL
Something I thought I had read a long time ago. As I get older my memory is becoming faulty. :P
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: NT VDM questions

Post by jal »

Colonel Kernel wrote:Something I thought I had read a long time ago. As I get older my memory is becoming faulty. :P
It's not just about memory: real mode code can be run in v86 only. Or did you think the VDM uses emulation? Think of the performance on the 386s of lore, and remember that half of the kernel time of Win 3.11 (and to a lesser extent 95) was spend in (real mode) DOS...


JAL
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Re: NT VDM questions

Post by Colonel Kernel »

There is no question that the Win9x kernel and its predecessors used v86 mode, but NTVDM came much later and is not based on that code AFAIK. Yes, I was under the impression that it used emulation, but the latest info says it does not, so either it changed or I misremembered something I read over ten years ago. The principle of Occam's razor leads me to believe the latter. ;)
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
Post Reply