Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Using Multiple CPU Cores in DOS? (Miscellaneous)

posted by bretjohn(R) Homepage E-mail, Rio Rancho, NM, 12.09.2011, 02:15

I had a thought this morning that I thought I would "throw against the wall to see if it sticks or not". I figured I would start on this forum since it seems to be where a lot of technical knowledge and "outside the box" thinkers hang out.

As many of you know, I have been working on updating my USB drivers, which is moving along slowly. One problem I have been running into is speed. More specifically, the major problem I am having is the fact that DOS runs in RM/V86, but I need to switch to PM in order to access and manipulate MMIO space of the EHCI and OHCI USB host controllers. There may be many of these mode switches that must occur during each IRQ, which very noticeably slows the entire system down. If the system can simply stay in one mode or the other (which it can with UHCI, since UHCI uses PIO instead of MMIO), the system speed issues are not so bad. But switching modes is EXTREMELY slow.

Up until now, most of my efforts to alleviate this problem have been to try and minimize the number of mode switches required (and I am going to continue to do that). However, this morning I thought of another approach that might prove beneficial to almost everyone needing PM access from DOS (VCPI, DPMI, DPMS, INT 15.87, etc.), not just my USB drivers. Instead of having a single CPU/Core switch between RM/V86 and PM, why not have one CPU/Core running in RM/V86 and another running in PM, and switch between the CPU's/Cores? I think switching CPU's would be almost instantaneous, much faster than switching modes on a single CPU.

This does not need to involve threads or anything like that (which I believe is beyond the scope of where DOS should go, anyway), but would still allow DOS to take advantage of the now-prevalent multi-CPU/multi-core technologies to increase speed. Because the system would still be single-threaded, though, the implementation should be simpler than what Windows or *nix requires.

I have no idea what the technical obstacles of such an approach might involve, though I'm sure they would be significant. E.g., I don't even know if it's even possible to have one CPU/Core running in RM/V86 and another in PM at the same time. It seems like it should be possible, but the CPU manufacturers may not have even considered this as a possibility, much less provided for or tested it.

I'm just throwing this out there for now to get some opinions of people who are far more knowledgeable about some of these things than I am. Feel free to throw darts if it is a dumb idea. I should also state right here that I do not intend to work on anything like this myself (at least in the near future), since I already have too many irons in the fire. If this is even practical, though, I thought it might pique somebody's interest who is looking for a practical project to work on.

 

Complete thread:

Back to the forum
Board view  Mix view
15196 Postings in 1365 Threads, 250 registered users, 16 users online (0 registered, 16 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum