Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

Object monitor information stored where in case of threads  RSS feed

Ranch Hand
Posts: 231
Eclipse IDE Java Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its pertinent that in case of threads working on some instance methods, it acquires the monitor or lock of that object and then goes in to operate.
I am thinking that there might be some kind of registry with this instance information and some flag in there that says whether its acquired or not.
I was just wandering where this information is stored and how is it shared between threads. It'll be great to know in case someone sheds some light on this.
Posts: 23816
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

This, of course, is an implementation detail of the JVM, and may vary from OS to OS, and from version to version. Having said that, since most of the thread stuff has been delegated to the underlying Operating System threading environment, it would be safe to assume that every object has access to a mutex lock and condition variable.

Curse your sudden but inevitable betrayal! And this tiny ad too!
Become a Java guru with IntelliJ IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!