Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Java JVM use pthread?

Does JVM on Mac OS X use pthread to create threads?

What about on Linux distributions, is it now default way to create threads for JVM on all distributions?

like image 668
newbie Avatar asked Jun 13 '15 07:06

newbie


People also ask

What is pthread in Java?

POSIX Threads, commonly known as pthreads, is an execution model that exists independently from a language, as well as a parallel execution model. It allows a program to control multiple different flows of work that overlap in time.

What are JVM threads?

A Java thread is the execution path in a program. Everything that runs in Java is run in threads. Every application in the JVM world has threads, at least one, even if you don't call it explicitly. It all starts with the main method of your code, which is run in the main application thread.

What is pthread used for?

PThreads is a highly concrete multithreading system that is the UNIX system's default standard. PThreads is an abbreviation for POSIX threads, and POSIX is an abbreviation for Portable Operating System Interface, which is a type of interface that the operating system must implement.


1 Answers

Yes, HotSpot JVM (i.e. Oracle JDK and OpenJDK) uses pthreads on Linux and on Mac OS X.

like image 144
apangin Avatar answered Oct 17 '22 09:10

apangin