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

Garbage Collection

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"The garbage collection algorithm in Java is vendor implemented "
Threading and garbage collection are two of the few areas that are platform dependent. This is one of the
reasons why Java is not suitable for realtime programming
There are 3 things which i can't understand
1) "The garbage collection algorithm in Java is vendor implemented "
2)what means of platform dependent?
3)what are the realtime programming?
Plz throw light on my these silly Q's?
thanx in advance .
 
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1st off, they're not silly questions...
1) "The garbage collection algorithm in Java is vendor implemented "
Meaning if you run the EXACT same program at the EXACT same time on a Windows box, a Solaris box, and an HP-UX box with the -verboseGC (so you see when the garbage collector executes). All 3 will produce different results. The algorithm that decides how/when the garbage collector will run is different between different vendors.
2)what means of platform dependent?
the exact implementation of is determined by the vendor (Sun, HP, Microsoft, etc.) and will be different between different platforms.
3)what are the realtime programming?
Realtime programming is a program that is dependent on the timeliness and predictablility of the execution. (maybe every 3 seconds the stock ticker will be updated, if you click "sell" things will be sold THAT second, at THAT price. -- In Java because you can't truly control thread scheduling -- you can't always guarantee things will happen in real time.
 
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jessica Sant:
3)what are the realtime programming?
Realtime programming is a program that is dependent on the timeliness and predictablility of the execution. (maybe every 3 seconds the stock ticker will be updated, if you click "sell" things will be sold THAT second, at THAT price. -- In Java because you can't truly control thread scheduling -- you can't always guarantee things will happen in real time.


Real time programming is usually more meaningful in the realm of embedded systems programming. The basic concept is that the execution must be performed within an exact timeframe - often within a set number of milliseconds.
This is something I'd expect would be addressed more often in programs that use J2ME, rarther than J2SE.
Corey
 
Ranch Hand
Posts: 1055
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The JVM is implemented differently on different OS (naturally...) So yes, the garbage collector depends on the implementation of the JVM on different platforms.
 
reply
    Bookmark Topic Watch Topic
  • New Topic