This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Object monitor information stored where in case of threads  RSS feed

 
Rajdeep Biswas
Ranch Hand
Posts: 231
1
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.
 
Henry Wong
author
Sheriff
Posts: 23275
125
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.

Henry
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!