久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Java 線程優先級如何轉換為 OS 線程優先級?

How are Java Thread priorities translated to an OS thread priority?(Java 線程優先級如何轉換為 OS 線程優先級?)
本文介紹了Java 線程優先級如何轉換為 OS 線程優先級?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

限時送ChatGPT賬號..

Java API 線程優先級 (1-10) 如何轉換為操作系統級別的優先級,因為大多數操作系統沒有與此匹配的線程優先級(在數量方面).

How are the java API thread priorities (1-10) gets translated to the OS level priorities since most OS don't have thread priority levels (in terms of number) which match this.

因此請記住,是否存在兩個或多個具有不同優先級的線程最終在操作系統級別獲得相同優先級的情況.

So keeping in mind , can there be a scenario when two or more threads with different priorities eventually get the same priority at OS level.

請澄清,如果我的理解有一些更正.

Please clarify, if I there is some correction in my understanding.

推薦答案

確實,某些優先級可以映射到相同的本機"優先級.以下是列表(基于 OpenJDK 6 中的 Hotspot 代碼):

Indeed, some priority levels can map to the same "native" priority level. Here's the list (based on the Hotspot code in OpenJDK 6):

  • 1 ? 0
  • 2 ? 32
  • 3 ? 64
  • 4 ? 96
  • 5 – 10 ? 127

值得注意的是,在 Solaris 上,您不能將線程優先級提高到高于正常水平,只能降低它:5 的優先級值與任何更高的值相同.

Of note is that on Solaris, you can't raise the thread priority above normal, only lower it: the priority value for 5 is the same as any of the higher values.

  • 1 – 10 ? 4 – -5(nice 值)

值得注意的是,在 Linux 上,Java 中不同的線程優先級確實映射到本機級別的不同優先級值.

Of note is that on Linux, different thread priorities in Java do map to distinct priority values at native level.

  • 1 – 2 ? THREAD_PRIORITY_LOWEST
  • 3 – 4 ? THREAD_PRIORITY_BELOW_NORMAL
  • 5 – 6 ? THREAD_PRIORITY_NORMAL
  • 7 – 8 ? THREAD_PRIORITY_ABOVE_NORMAL
  • 9 – 10 ? THREAD_PRIORITY_HIGHEST

這篇關于Java 線程優先級如何轉換為 OS 線程優先級?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Parsing an ISO 8601 string local date-time as if in UTC(解析 ISO 8601 字符串本地日期時間,就像在 UTC 中一樣)
How to convert Gregorian string to Gregorian Calendar?(如何將公歷字符串轉換為公歷?)
Java: What/where are the maximum and minimum values of a GregorianCalendar?(Java:GregorianCalendar 的最大值和最小值是什么/在哪里?)
Calendar to Date conversion for dates before 15 Oct 1582. Gregorian to Julian calendar switch(1582 年 10 月 15 日之前日期的日歷到日期轉換.公歷到儒略歷切換)
java Calendar setFirstDayOfWeek not working(java日歷setFirstDayOfWeek不起作用)
Java: getting current Day of the Week value(Java:獲取當前星期幾的值)
主站蜘蛛池模板: 久久久国产一区二区三区 | 日本午夜网站 | 天天综合干 | 久久成人精品视频 | 伊人伊成久久人综合网站 | 国产成人综合亚洲欧美94在线 | 蜜臀久久99精品久久久久野外 | 日韩一区二区三区在线看 | 久久久99国产精品免费 | 国产精品久久久久一区二区三区 | 美女久久视频 | 欧美成年网站 | 91n成人| 日韩免费 | 99精品网| 国产在线精品一区二区三区 | 国产欧美精品区一区二区三区 | 狠狠色综合网站久久久久久久 | 在线观看成人av | 亚州毛片 | 日韩精品在线免费观看 | 99热视 | 中文字幕亚洲无线 | 亚洲精品综合 | 亚洲精品一区中文字幕乱码 | 久久久不卡网国产精品一区 | 国产精品久久久久久影院8一贰佰 | 国产免费观看一级国产 | 中文字幕成人在线 | 亚洲精品久 | 日本欧美在线视频 | 一区中文字幕 | 国产精品成人一区二区三区吃奶 | 亚洲高清一区二区三区 | 日韩av一区在线观看 | 亚洲一区二区在线视频 | 在线播放中文字幕 | 久久国产欧美日韩精品 | 秋霞a级毛片在线看 | 亚洲a一区二区 | 粉嫩av|