NetworkChannel Polling Abstraction #186
Replies: 4 comments
-
Hm, that is indeed unfortunate. We went back and forwards for a while before settling on the async, callback-oriented approach. I wonder if Patmos and S4NOC don't support interrupts? (@schoeberl ?). |
Beta Was this translation helpful? Give feedback.
-
Patmos does support interrupts. I just do not like them ;-) You know devices can bring down systems when issuing to many interrupts. E.g., in the old days Windows was disabling interrupts when getting too many and switched to polling. On the other hand, interrupts can get lost, so devices started to reissue interrupts when not being served in time. |
Beta Was this translation helpful? Give feedback.
-
That is true. Well, we could require a parameter called something like |
Beta Was this translation helpful? Give feedback.
-
OK, great that we find a polling solution. We can later look into interrupts as well, but a software only solution is an easier step forward (instead of adding HW and introducing true concurrency). |
Beta Was this translation helpful? Give feedback.
-
This discussion is motived by the requirements of the S4noc, which only provides the user with a status register to check whether data is available. The second problem is that the Patmos platform does not support multithreading. Therefore, we cannot simply spawn a new thread that loops and receives data.
The solution that seems most attractive to me at the moment is to rename our current
NetworkInterface
toAsyncNetworkInterface
and create a newPollNetworkInterface
that enforces a homegenous polling API.The remaining unpleasant problem is that we still want to poll for new data while the runtime environment goes to sleep, but there are two sensible solutions in my opinion:
Beta Was this translation helpful? Give feedback.
All reactions