View Single Post
Old 08-01-2000, 07:20 PM   #9
Toaster
Member (13 bit)
 
Toaster's Avatar
 
Join Date: Apr 1999
Location: Now in Phoenix, AZ. Where next? Only 8 states left to see.
Posts: 4,661
Post

Hey there Hal (and others),
USB is a "low latency" device in my opinion.
The sharing of a USB interupt should be possible as you noticed.
USB has 2 different options, legacy and driver assist. Legacy is where the BIOS adds support via onboard drivers and IRQ mapping.
The "driver assist" is where the USB hardware is operated almost soley via software but at higher latency. One can use the "soft modem" and "hardware modem" and analogy and get an idea thats roughly the same.
Per spec, USB doesn`t *require* an IRQ but uses it to boost performance. Since most USB devices don`t move a great deal of data at any given time, increased latency isn`t seen or noticed because the USB interface isn`t fully utilized. Were you using the USB interface at +90% you would notice a performance drop or even instability at high data rates. This equates back to sharing and the "latency" of the devices sharing the IRQ.
The higher the "latency" the less likely a trouble free sharing. To test this theory, try moving as much data as possible while another device using the same IRQ also is utilized more fully. Now, some systems utilize USB hardware differently and results may vary wildly depending on the way the USB hardware is configured/designed into the system board. A simple USB modem or printer uses very little CPU time because data rates are below 60kb/sec and often MUCH lower.
This is not the case with SERIAL ports because not only does the CPU have to manage the port but whats connected to the port as well. This is why sharing IRQ`s with a serial port usually meets with problematic performance and instabilities.
Don`t confuse say Comm-x and Comm-x using the same IRQ but also using differing addresses. In this, each device is active in turn and not at the same time. This was a commonplace problem with modems set to Comm4 and a serial mouse on Comm1. When the modem started to dial, the mouse pointer became either erratic or the mouse ceased to function or the modem failed to function and the mouse worked.
What I term "sharing" is the ability for multiple devices to use the same IRQ but not "conflict" when BOTH devices become active.
While BOTH devices *DON`T* actually become active at the same time, they actually use the "time" the other isn`t using at that particular time. You cant actually have 2 devices sharing the same IRQ at the same time without a problem. The trick is using "unused" Interupt time, hence the term "latency". If one sets things correctly and the devices co-exist well, the "sharing" becomes invisable because EACH device uses a "portion" on the IRQ "time" and the CPU can service each IRQ request without "triggering" the other device(s). Each device will have a unique address and when that device becomes INACTIVE the other device becomes ACTIVE and then repeats. Each taking turn and using only a portion of CPU Interupt time. So, your not actually sharing the IRQ, you are simply taking advantage of the available "off" time to enable another device.


Whew...my fingers hurt....
Toaster is offline