monitor : Java Glossary


Java uses monitors to coordinate threads to make sure they don’t trip over each other accessing the same data. With monitors, you either lock objects, critical sections of code or you lock entire methods by declaring them synchronised. Monitors have hardware test and set support behind them to ensure a thread checks to see if a monitor is already locked and if not, seize the lock all in one non-interruptible atomic operation. Without atomicity, a thread might check see if the monitor is unlocked and have some other thread grab the monitor before it gets a chance to lock it. Purists will point out that a monitor is not actually the lock, but rather the way that lock is used to protect critical sections of code.

LCD (Liquid Crystal Display) monitors are called raster screens in Java, the glass displays you look at.

This page is posted
on the web at:

Optional Replicator mirror
on local hard disk J:

Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

Your face IP:[]
You are visitor number