Hello everybody,

as a long time (decades) Java developer now converting to bare metal C,
I would like to ask about how to do parallelization properly. The poor
man's approach the Java APIs implement pretty much resemble what every
one else is doing. Take the number of processors available in a system
and size everything to this. This just does not make sense, because
there are a lot of other processes or even kernel threads competing in
parallel. Is there some standard API (e.g. POSIX) allowing an
application to reserve a certain amount of processors to a specific
application? What I mean is - you can run make -j8 on a machine with 16
CPUs. That does not mean that this make really can use those 8 CPUs
exclusively as requested. Same for the Java VM. Starts multiple
background threads. Needs to share all CPUs with the OS and various
other processes. Still just uses the number of CPUs available to size
things. I am searching for some kind of system API allowing an
application to reserve a certain amount of CPUs exclusively - not shared
with any other application - maybe not even the OS. Does this make sense?

-- 
Christian

Reply via email to