500000 invokations per second? Forget it, it's not going to happen. There are at most 1000 timer interrupts per second in the system. 500k signals from the driver would be 500 calls per one timer quantum. I don't think even a real time system could guarantee that. Let's go further - 500k ticks per second (5E+5) on a 1GHz computer (1E+9) would mean ~E+4 cpu cycles per one invocation. That's about how long a context switch takes (actually it's a few thousand cycles).
Besides if the system would even somehow manage to deliver so many interrupts you wouldn't be able to do anything with them. 40k per second is 40 events per millisecond, I don't think any system would live with even that especially if you want it to remain responsive. I suggest you handle 100 calls per second. Unless you are driving a live nanite in a bloodstream this will be enough for almost anything. And signals will have no problem handling that, especially if you emit them only once in a while (if a signal is pending, there is no point in emitting another one, right?).
Bookmarks