3 ms·
How do you run code on multiple cores? (What's your kernel in this case, if it's non-POSIX?)
by geofft 11y ago
How do you run code on multiple cores? (What's your kernel in this case, if it's non-POSIX?)
- 15155 11y agoSend some kind of very-low-level interrupt, pointing each core at code to run, I am guessing? I could see Rust's ownership and multithreading amenability being extremely useful at this level, but admittedly I don't know enough.
- dbaupp 11y agoIsn't that exactly what a thread is? Well, threads generally have some management by the OS to allow more threads than CPU/share tasks evenly, but at their core, they allow you to give each core some code to run on. (And yes, Rust's threading safety applies equally well to that. It doesn't care about the details of how code is running concurrently/in parallel, just that it could be.)