• 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:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

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.
 
No one can make you feel inferior without your consent - Eleanor Roosevelt. tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic