Using Multiple CPU Cores in DOS? (Miscellaneous)
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:
- Using Multiple CPU Cores in DOS? - bretjohn, 12.09.2011, 02:15 (Miscellaneous)
- Using Multiple CPU Cores in DOS? - RayeR, 12.09.2011, 15:26
- Using Multiple CPU Cores in DOS? - Laaca, 12.09.2011, 17:26
- Using Multiple CPU Cores in DOS? - RayeR, 12.09.2011, 20:13
- Using Multiple CPU Cores in DOS? - bretjohn, 12.09.2011, 22:36
- Using Multiple CPU Cores in DOS? - RayeR, 13.09.2011, 00:33
- Using Multiple CPU Cores in DOS? - bretjohn, 13.09.2011, 04:25
- Using Multiple CPU Cores in DOS? - RayeR, 13.09.2011, 19:32
- Using Multiple CPU Cores in DOS? - Laaca, 13.09.2011, 21:12
- Using Multiple CPU Cores in DOS? - bretjohn, 13.09.2011, 23:02
- Using Multiple CPU Cores in DOS? - RayeR, 14.09.2011, 03:30
- Using Multiple CPU Cores in DOS? - bretjohn, 14.09.2011, 18:24
- Using Multiple CPU Cores in DOS? - RayeR, 15.09.2011, 01:15
- Using Multiple CPU Cores in DOS? - bretjohn, 15.09.2011, 19:11
- Using Multiple CPU Cores in DOS? - RayeR, 15.09.2011, 01:15
- Using Multiple CPU Cores in DOS? - bretjohn, 14.09.2011, 18:24
- Using Multiple CPU Cores in DOS? - RayeR, 14.09.2011, 03:30
- Using Multiple CPU Cores in DOS? - bretjohn, 13.09.2011, 23:02
- Using Multiple CPU Cores in DOS? - Laaca, 13.09.2011, 21:12
- Using Multiple CPU Cores in DOS? - RayeR, 13.09.2011, 19:32
- Using Multiple CPU Cores in DOS? - bretjohn, 13.09.2011, 04:25
- Using Multiple CPU Cores in DOS? - Rugxulo, 13.09.2011, 02:27
- Using Multiple CPU Cores in DOS? - RayeR, 14.09.2011, 03:52
- Using Multiple CPU Cores in DOS? - tom, 14.09.2011, 13:24
- Using Multiple CPU Cores in DOS? - bretjohn, 14.09.2011, 19:03
- Using Multiple CPU Cores in DOS? - tom, 15.09.2011, 14:43
- Using Multiple CPU Cores in DOS? - bretjohn, 15.09.2011, 18:24
- Using Multiple CPU Cores in DOS? - tom, 15.09.2011, 18:40
- Using Multiple CPU Cores in DOS? - bretjohn, 16.09.2011, 01:33
- Using Multiple CPU Cores in DOS? - RayeR, 16.09.2011, 02:26
- Using Multiple CPU Cores in DOS? - bretjohn, 16.09.2011, 18:06
- Using Multiple CPU Cores in DOS? - RayeR, 16.09.2011, 18:22
- Using Multiple CPU Cores in DOS? - bretjohn, 17.09.2011, 02:03
- Using Multiple CPU Cores in DOS? - Laaca, 17.09.2011, 07:47
- Using Multiple CPU Cores in DOS? - tom, 17.09.2011, 14:09
- Using Multiple CPU Cores in DOS? - bretjohn, 18.09.2011, 04:27
- Using Multiple CPU Cores in DOS? - tom, 19.09.2011, 15:03
- Using Multiple CPU Cores in DOS? - bretjohn, 19.09.2011, 19:50
- Using Multiple CPU Cores in DOS? - tom, 19.09.2011, 22:00
- Using Multiple CPU Cores in DOS? - bretjohn, 19.09.2011, 23:19
- Using Multiple CPU Cores in DOS? - tom, 20.09.2011, 12:02
- Using Multiple CPU Cores in DOS? - DOS386, 20.09.2011, 12:24
- Using Multiple CPU Cores in DOS? - bretjohn, 20.09.2011, 18:23
- Using Multiple CPU Cores in DOS? - tom, 20.09.2011, 20:17
- Using Multiple CPU Cores in DOS? - tom, 20.09.2011, 12:02
- Using Multiple CPU Cores in DOS? - bretjohn, 19.09.2011, 23:19
- Using Multiple CPU Cores in DOS? - tom, 19.09.2011, 22:00
- Using Multiple CPU Cores in DOS? - bretjohn, 19.09.2011, 19:50
- Using Multiple CPU Cores in DOS? - tom, 19.09.2011, 15:03
- Using Multiple CPU Cores in DOS? - RayeR, 19.09.2011, 15:01
- Using Multiple CPU Cores in DOS? - bretjohn, 19.09.2011, 20:25
- Using Multiple CPU Cores in DOS? - RayeR, 20.09.2011, 03:14
- Using Multiple CPU Cores in DOS? - bretjohn, 19.09.2011, 20:25
- Using Multiple CPU Cores in DOS? - bretjohn, 18.09.2011, 04:27
- Using Multiple CPU Cores in DOS? - bretjohn, 17.09.2011, 02:03
- Using Multiple CPU Cores in DOS? - RayeR, 16.09.2011, 18:22
- Using Multiple CPU Cores in DOS? - tom, 15.09.2011, 18:40
- Using Multiple CPU Cores in DOS? - bretjohn, 15.09.2011, 18:24
- Using Multiple CPU Cores in DOS? - tom, 15.09.2011, 14:43
- Using Multiple CPU Cores in DOS? - bretjohn, 14.09.2011, 19:03
- Using Multiple CPU Cores in DOS? - RayeR, 13.09.2011, 00:33
- Using Multiple CPU Cores in DOS? - Laaca, 12.09.2011, 17:26
- Using Multiple CPU Cores in DOS? - DOS386, 13.09.2011, 07:11
- Using Multiple CPU Cores in DOS? - bretjohn, 13.09.2011, 19:14
- Using Multiple CPU Cores in DOS? - FFK, 18.09.2011, 04:44
- Using Multiple CPU Cores in DOS? - RayeR, 19.09.2011, 14:50
- Using Multiple CPU Cores in DOS? - FFK, 21.09.2011, 01:30
- Using Multiple CPU Cores in DOS? - RayeR, 19.09.2011, 14:50
- USBDOS | A20-BUG | no need for 1'000'000'000 cores - DOS386, 20.09.2011, 09:10
- USBDOS | A20-BUG | no need for 1'000'000'000 cores - bretjohn, 20.09.2011, 19:34
- Using Multiple CPU Cores in DOS? - RayeR, 23.09.2011, 02:27
- Using Multiple CPU Cores in DOS? - RayeR, 12.09.2011, 15:26