I was just reading about "How does a server" handles multiple requests and ended up with java multithreading and multiple cores cpu.
During the days when the computers were single core and if there are 2 threads in java at the same time then jvm scheduler will take care of giving time to each thread. So, two threads never runs in parallel but makes use of ideal time (e.g. if a thread is blocked on some resource).
But is this is case with multiple cores and fork/join framework in java7 ? I mean i have heard that with multiple cores we can actually achieve parallelism. So, if i have two threads running, two cores cpu and each thread is given a separate core (it is not guaranteed though) then will they actually be parallel because jvm scheduler will still lead to time interleaving?
I am sorry if this question is stupid but i am really not sure on this one. Please help me to understand!!
Thanks! Ouney