JVM线程调度算法是什么? [英] What is the JVM thread scheduling algorithm?

查看:25
本文介绍了JVM线程调度算法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的很好奇 JVM 是如何处理线程的!

I am really curious about how the JVM works with threads!

在互联网上的搜索中,我找到了一些关于 RTSJ 的材料,但我不知道这是否是我的答案的正确方向.

In my searches on the internet, I found some material about RTSJ, but I don't know if it's the right directions for my answers.

谁能给我一些关于 JVM 调度算法的指导、材料、文章或建议?

Can someone give me directions, material, articles or suggestions about the JVM scheduling algorithm?

我也在寻找有关调度程序中 Java 线程默认配置的信息,例如在时间切片的情况下每个线程需要多长时间.

I am also looking for information about the default configuration of Java threads in the scheduler, like how long does it take for every thread in case of time-slicing.

感谢您的帮助,谢谢!

推荐答案

没有单一的 Java 虚拟机;JVM 是一种规范,它有多种实现,包括 OpenJDK 版本和 Sun 版本等.我不确定,但我猜想任何合理的 JVM 都会简单地使用操作系统提供的底层线程机制,这意味着 UNIX(Mac OS X、Linux 等)上的 POSIX 线程(pthreads)并且会暗示 Windows 上的 WIN32 线程.通常,这些系统默认使用循环策略.

There is no single Java Virtual Machine; JVM is a specification, and there are multiple implementations of it, including the OpenJDK version and the Sun version of it, among others. I don't know for certain, but I would guess that any reasonable JVM would simply use the underlying threading mechanism provided by the OS, which would imply POSIX Threads (pthreads) on UNIX (Mac OS X, Linux, etc.) and would imply WIN32 threads on Windows. Typically, those systems use a round-robin strategy by default.

这篇关于JVM线程调度算法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆