Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Thread Scheduling In Different JVMs

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I read in the certificate book that JVMs might have different scheduling mechanisms. Doesn't Sun make sure that there is a standard to how a JVM must be implemented to prevent such problems?
 
Ranch Hand
Posts: 400
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if I'm not wrong you are talkin about time slicing?right?

well schedulin/time slicing is depend on processors/memory.
obviously scheduling mechanisms will be different on single processor machine rather than multi-processor machine.


hth

Minhaj
 
Lennie De Villiers
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes the priority of how threads are executed, the book say that JVMs might implement it differently per JVM... but my question is that they all should actually have the same implementation right?


M M kaimkhani wrote:if I'm not wrong you are talkin about time slicing?right?

well schedulin/time slicing is depend on processors/memory.
obviously scheduling mechanisms will be different on single processor machine rather than multi-processor machine.


hth

Minhaj

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The VM specification about how the thread scheduler should implemented is very abstract and it can vary. The choice is up to the designer of the particular VM. So the the thread scheduler in one VM might not work in similar way as a scheduler in some other VM.
 
Ranch Hand
Posts: 317
Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moreover it also depends on the OS where the program is running so the behavior of different JVM's will be different.
 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It depends upon the underlying OS because the JVM (or most of the JVMs) pass on the the Java threads to the system's thread implementation. So UNIX systems will implement in a particular way, Windows in some other way.

Even under two UNIX systems, its not assured in the JVM spec that the order of thread execution will be the same because it also depends upon the CPU and memory usage.

Vijay.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic