java线程与操作系统线程
发布网友
发布时间:2022-05-17 05:17
我来回答
共3个回答
热心网友
时间:2023-10-09 04:28
java线程管理是JVM的一部分,虽然大部分JVM直接映射java线程到底层系统线程,但是还是java的线程管理决定谁有机会运行
The thread scheler is the part of the JVM (although most JVMs map Java threads directly to native threads on the underlying OS) that decides which thread should run at any given moment, and also takes threads out of the run state. Assuming a single processor machine, only one thread can actually run at a time. Only one stack can ever be executing at one time. And it's the thread scheler that decides which thread—of all that are eligible—will actually run.
热心网友
时间:2023-10-09 04:28
java里的线程应该只是在jvm环境中开出来的空间中的占的吧,java线程所占内存数+运行内存=jvm的内存。应该是这样的。跟操作系统的内存有关系的只是通过JVM在操作系统中按默认或手动开的大小,JVM内的线程跟操作系统中不能直接关系上的应该是
热心网友
时间:2023-10-09 04:29
操作系统没有线程,那是进程,线程是由一个进程管理的。运行一个软件或则什么应用程序,就必须有一个进程,windows是多任务系统,也就是说可以有很多个进程。线程是进程开辟出来的,也就是说进程是给系统管理的,线程是给进程管理的。现在java线程交由解释器JVM管理,其实JVM就是一个进程,一个进程结束,其开辟的线程也会全部结束。