Multicores and mulithreads [closed]

梦想的初衷 提交于 2020-01-11 07:55:10

问题


If a software devoloped with multi threading , Is it true that multicore processor executes that software efficiently by using software threads of operating system i.e when i create multiple threads in java those threads are exicuted simultineously by multicore processor by linking these java threads with software threads of OS ?


回答1:


It varies with the JVM implementation and OS, but when coding you should take a defensive position and assume that multiple threads will be active at the same time.

Pragmactically, you will see good use of multiple cores on many major platforms. There's quite a bit of cleverness in commerical JVMs now to do garbage collection so as to reduce the impact of that on muti-core platforms.



来源:https://stackoverflow.com/questions/5594568/multicores-and-mulithreads

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!