[fpc-pascal] Threading vs Parallelism ?

Brian vmst at golden.net
Tue May 9 16:35:52 CEST 2017


I should have said "streaming" rather than "serial". True Parallelism is a
long way off in the future , but a form of parallelism can be had using
multiple CPU cores and hard affinity as described in the excellent article.

http://www.ibm.com/developerworks/linux/library/l-affinity/index.html#download

Consider the case of a special purpose custom design PCIe card and Linux.
The classical way to interface with the card is to write an interrupt
handler and accept the fact that doing so opens all your proprietary code
due to the GPL. It also must wrestle with the black magic mess of BIOS PCI
IRQ assignment and conflicts with other hardware.

Another approach is to memory map the PCIe card in  user space, use hard
affinity and dedicate one CPU core to poll the card memory in user space. In
this case the GPL does not apply and the issue of IRQ assignment is not an
issue.

Another approach is to abandon the add-in (PCIe) card approach and use
gigabit Ethernet with a dedicated CPU core as the I/O. This what was done on
the current project.

Brian



--
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Threading-vs-Parallelism-tp5728018p5728501.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.



More information about the fpc-pascal mailing list