4 ms·
Do Java Native Interfaces suffer the same sort of problem?
by motoboi 11y ago
Do Java Native Interfaces suffer the same sort of problem?
- rdtsc 11y agoJava maps its threads to native OS threads one-to-one. So if you execute in a thread in Java then jump to C you'll block that particular thread. Erlang implementas N:M concurrency where N Erlang processes map to M schedulers (a scheduler here is a separate OS thread ). N is usually greater than M. So you might have N=100K processes mapping to M=16 threads. If one of those processes makes a call to a C module it might block large (say 10k) number of other processes from executing.