'own monitor' or 'own lock'?

Dear,
I am writing about basics of threads, but at one moment I become confused. At some books I saw "own monitor" and some "own lock". I though that
"Thread owns monitor."
is the same as
"Thread owns lock."
actually, monitor is something what was used before, but now thats are locks, but people still say "monitor". I didn't find some part which makes it, at least to me, clear.
Is that true or it is not, in that case, what is real truth?
I read
http://java.sun.com/docs/books/jls/third_edition/html/memory.html
"Thinking in Java 3rd edition", Bruce Eckel
Also, look at next situtaion
public synchronized void a(){
  wait();
public synchronized void b(){
  a();
}If thread starts b(), counter of locks will become 1; when starts a() counter will become 2. When calls wait(), lock (or monitor?) will be completely realised. When it got notify() and re-own lock, it will get out of the wait set (suppose in the wait set is only that thread) and number of locks (counter) will be restored to value which was before thread goes to wait set. Where JVM keeps value of counter when thread is in the wait set? Actually, where JVM keeps number 2, in this example?
I know this is not so important for properly using synchronized, wait(), notify() and new locks, but I am interesting about what is really happening there :)
Thank you.

boba5555 wrote:
You wrote :"As far as I know, lock and monitor are used interchangeably in that context."
But, I am just not sure is that right or 'own monitor' and 'own lock' must be considered differently and actually, lock is not same as monitor. Question is about synchronized part in JDK 1.4 or later.Like I said, I've never seen a distinction between them as far as Java's language level multithreading concepts are concerned. Maybe the terms have different and distinct meanings in other contexts. Sometimes in Java we might say that a particular object is the monitor, and we own that object's (monitor's) lock, but even that's fairly loose usage. And any object can serve as a "monitor" in that sense, regardless of whether its methods are all synchronized or if its fields are all private or not.
I wouldn't worry about it too much. Unless you're writing your own VM or compiler, or implementing java.util.concurrent, you probably won't find a meaningful distinction.

Similar Messages

  • HT5621 Hi I'm using my wife's email for my apple Id but now she has got an iPhone we r both using the same one ive tried gettin my own using my own email but it keeps telling me my email is already in use how can that be????

    Hi I'm using my wife's email for my apple Id but now she has got an iPhone we r both using the same one ive tried gettin my own using my own email but it keeps telling me my email is already in use how can that be????

    Are you trying to set up your own iDevice and that is why you want your own Apple ID?
    Do you realize that any content that you have already purchased using her ID will still have to be used if you want to update apps or download purchases again for free? ITunes and App Store content is tied to the ID used to make the purchase. Furthermore, if you use her ID to download a purchased app for free on your own device, you can lock yourself out of your ID for 90 days.
    Back to the question at hand .... Did she use your email address as the rescue email address for her Apple ID?

  • Which own monitors can I add into DAs

    Hi!
    I want to clear out the question on which own created monitors can I add into Distributed Applications? For example:
    I can find all monitors that I have created through Management Packs Template and add it into my DA if the monitor is from a sealed MP or in the same unsealed MP as my DA.
    I cannot add any monitors that I have created through Management Pack Objects/Monitors/Unit Monitor into any DA. Why?
    //Mats A

    Yes I understand that but for example:
    I creat one monitor Management Pack Objects/Monitors/Unit Monitor/Windows Event/Simple Event Detection/Manual Reset 
           - Name on the monitor is Approved_ID222_Event
           - Save this monitor in Approved_Monitoring
    MP
    Create one DA
           - Name on the DA is Approved
           - Save this DA in Approved_Monitoring
    MP
           - Try to find my monitor Approved_ID222_Event
    through Advanced Search. Cannot find my monitor
    //Mats A

  • Add the styles or owns to the page lock

    Theft and missing cell phone
    Since cell phone theft is high and we may lose your mobile phone, we perhaps Styles a cell phone owner wants to return to the cell phone and.But how, with Touch ID that Apple could not be entered and the number mkhafianh will find its owner and rang. At least in the mobile phone sector lock screen is that if one Styles a cell phone, he will be able to return to its owner's mobile phone. Sorry if wrong was writing because it was used to translate online. Thanks

    Find My iPhone has a function called Lost Mode.  Enabling Lost Mode remotely via the Find My iPhone app on another iOS device or via www.icloud.com on a computer or non-Apple mobile device lets the owner put a customized message, including a contact email and/or phone number.
    Or, if you want to have such a message on the Lock Screen at all times, create an image that has your contact information, and use that as your lock screen image.

  • HT2731 My daughters iPad has just been factory restored from the apple shop, she was on my iTunes account with her email address but now she is the correct age for her own account. We have started up the iPad and with trying to create her own with her own

    My daughters iPad has just been factory restored from the apple shop, she was using my iTunes account with her email. When trying to create her own iTunes as she is the correct age it has come up that her email is already being used. How do we  do this with he same email address

    Hello spooner68,
    Thank you for the details of the issue you are experiencing when trying to create an Apple ID for your daughter.  Because her email address is associated with your Apple ID, you are receiving the message that the email address is in use. 
    To remedy this, you will have to first remove her email address from your account using steps 1-3 of the section titled "How to add an additional email address that is already associated with another Apple ID" in the article below and then attempt to create her Apple ID with her email address:
    How to add an additional email address that is already associated with another Apple ID
    If you have an email address that is already associated with another Apple ID, you may need to remove it from your other Apple ID before you can add it to your preferred Apple ID.
    Sign in to My Apple ID with the Apple ID that has the email address already associated with it.
    Find the email address that you want to move to your preferred Apple ID, then click Delete.
    Click Save Changes, then click Sign Out at the top of the page.
    You can find the full article here:
    Apple ID: Associating and verifying email addresses with your Apple ID
    http://support.apple.com/kb/HE68
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • I have a Macbook Pro 13" and a 24" external lcd monitor go gray (lock-up)

    If I plug my external monitor into my Macbook pro 13, via mini displayport, sometime durning the day, lately multiple times, the Mac and external monitor will go flat gray and "lock-up" only solution is to hold power button down and reboot.  This problems seems to be happening more frequently.  Yesterday I tried a test of not using the external monitor and the machine did not lock up once.  I am speculating that the onboard graphics chip may be over-heating or something with the external monitor connected???  I will try a different external monitor and see if I get the same issue.  Curious if anyone else has had this happen, thanks.

    Hello ajaylamb,
    Testing with another display would definitely be a great troubleshooting step. If you're using a display adapter, you may need to test with another adapter, as well.
    Apple computers: Troubleshooting issues with video on internal or external displays
    http://support.apple.com/kb/HT1573
    Cheers,
    Allen

  • BP_CONT_SEARCH own button and own logic

    Hello,
    i need to implement a own button in the result list of component BP_CONT_SEARCH.
    Which method do i need to redifine to add my own button?
    With this button i need to read additional data to all Contact persons in the result list and export a detailed list per excel.
    What is the easiest way to get all contact persons (for example ID or GUID) in the result list?
    Thank you
    Kind regards
    Manfred

    For button creation, code in DO_PREPARE_OUTPUT of the result IMPL class after redefining. Once done. On-Click event name should be created in the same IMPL class. This method id where you will code the logic.
    Since the netity would be available from the context node RESULT, you will have the collection for all the entities. STRUCT.BP_GUID  will give you the necessary GUID of the concerned contact person.
    Rg,
    Harshit

  • CCMS Monitoring of SM12 locks

    We need to monitoring SM12 locks that are older than 1 day. I am not
    sure why lock entries remain in SM12 after user logged off. Old entries
    found in SM12 which is causing performance problem. Kindly adive how to
    monitor SM12 locks from CCMS and generate alerts.

    Hello,
    I know this is an old thread - but issue tracked me, so I occupied myself again with it.
    Here are possiblities I found out meanwhile:
    Monitoring with 'sapcontrol -nr 00 -function EnqGetLockTable' or EnqGetStatistic
    -> doesn't work on our systems, error "FAIL: EnqMon_GetTable failed"; I didn't investigate in this.
    Monitoring with 'sapcontrol -nr 00 -function GetAlertTree'
    -> no possibility to show entries older than a specified time, only QueueLength and something like this can be monitored (same as CCMS via SAP directly)
    Monitoring with function module ENQUEUE_READ (not recommended by SAP!)
    -> need of an ABAP programer to realize this for dumping the created table into a file on os-side
    Monitoring with 'enqt pf=/usr/sap/SID/SYS/profile/SID_DVEBMGS00_hostname 20 0 3'
    -> this seems to be the solution for us; we realized this request in a regulary executed script on os-side and grep for dates older than one day - if so an alert is triggered.
    So perhaps this might be useful for anybody.
    Enhancement of list appreciated :-)
    Regards,
    Julia

  • HT4865 right now i share an icloud with my sisters phone how do i log out of hers and make my own for my own phone without deleting either of our apps etc?

    right now i share an icould with my sister's phone how do i log out of hers and make my own for my phone without deleting either of our apps etc on our phone?

    You don't need to worry about apps.  You can continue to share the same ID for the iTunes and App stores but in order to create a new iCloud account you will need to use a different ID (it doesn't need to be the same as your iTunes ID).
    To migrate your phone to your own account,  if you have any photos in photo stream that you want to save on your phone, open your my photo stream album and save them to the camera roll by tapping Edit, then tap all the photos you want to save, tap Share and tap Save to Camera Roll. 
    Once this is done, go to Settings>iCloud, scroll to the bottom and tap Delete Account.  (This will only delete the account from this phone, not from iCloud.  Your sister's phone will not be effected by this.)  When prompted about what to do with the iCloud data, be sure to select Keep On My iPhone.  Next, set up your new iCloud account using a different Apple ID (if you don't have one, tap Get a Free Apple ID at the bottom).  Then turn iCloud data syncing for contacts, etc. back to On, and when prompted about merging with iCloud, choose Merge.  This will upload the data to the new account.
    Once your phone is on its own account, you can go to icloud.com on your computer, sign into your account and manually delete any of your sister's data from your account.  She can also delete any of your data from her account.

  • Which MSI do you own / want to own?

    I've got the MSI GT70 Dragon Edition and couldn't be happier with it. My first MSI, and as far as I'm concerned, I'll be a customer for life assuming the quality remains the same.
    I made a review of it here: http://www.youtube.com/watch?v=SdpMTjxgX1c
    This review is a little dated, as I've spent way more time with the machine since then, but if anything I'm more impressed with it as time goes by. As I understand it, there's a non-Dragon Edition with the same hardware profile for a bit less $$$.

    Also, I will attach photos of my laptop as the internet does not have justifiable photos of the beautiful GT70-2OC:

  • Put own apps on own iPhone

    Hello All
    I am starting to learn objective-c and and develop for iPhone. Before I decide to pay the $99 for a developer license, I would like to test MY iPhone apps on MY iPhone, without jailbreaking or paying for the developer license.
    Is this possible?
    Any help appreciated,
    xenicraft

    You have to pay the $99 to install and test on a device.

  • IPod mini goes into pause on its own

    My iPod mini goes into pause mode on its own even though the lock is on. I have to then, unlock and press play to continue. Any idea if this is a hardware or software bug. Thanks.

    I have the same problem. It is indeed the headphone connection. Sometimes I just barely touch the jack and it pauses, very inconvenient for a mobile device!!! Is there any way to cancel this stupid function? I am old enough to turn my ipod off after use and when I forget it, I will just recharge it. Excuse my sarcasm, but I hate function that are only noticed when causing problems. For now I have to get off my bike and press play everytime the cord moves a nanometer!

  • HT201365 Company owned devices

    How can we deal with company owned iOS 7 devices locked to an employee's personal Apple ID after they have left the business?! We have 60 devices in our organisation, and Apple does not appear support:
    - Blocking users from upgrading to iOS 7. We just have to ask nicely - but patience will run out!
    - Blocking download/use of Find My iPhone
    - Disabling Activation Lock via MDM
    So, how can we realistically manage this from an asset management/IT perspective? The company own the device - not the individual user. However, you must login to the device with an Apple ID. The only possible option I see is to create Apple IDs against their company email addresses, so we can reset the Apple ID password should they leave the business. This would be a nightmare, and users would not be keen on adding their personal credit card details to a work email address. Also, any personal app's purchased against that ID cannot be transferred to another email address - so again, this isn't a feasible solution.
    I understand what Apple were going for with this feature - In fact, for regular home/consumer users it's a fantastic feature which will hopefully reduce thefts etc. But yet again, Apple don't seem to realise they have a huge enterprise user-base where we need to be able to manage/control certain features centrally.
    Does anyone have any thoughts on this?

    Some potentially good news on the horizon for anyone else concerned by this feature for company owned devices. I have heard there is an upcoming release by Apple to their MDM partners called "Streamlined MDM Enrolment". This is actually listed on the Education page for iOS 7 already. This will supposedly enable devices to be fully enrolled and provisioned over-the-air (in "supervised" mode) without the need for a physical connection using USB or Apple Configurator.
    Streamlined MDM enrolment.
    With automatic device configuration, new devices purchased by a school can be wirelessly enrolled into their MDM system during setup. In addition, new devices can be placed wirelessly in supervised mode, which enables enhanced management options. With streamlined MDM enrolment, users can be up and running quickly without the need for manual configuration by IT.
    I await some timescales as to when we'll be able to utilise this new feature.

  • Blocking Locks monitoring in 12c cloud control

    Ours is a 11.2 4 node RAC environment, and to check for blocking locks i run a sql script. I want to monitor the blocking locks in the system and if there are any locks for more than say 10 minutes then send out a mail to a group to look into it.
    We have 12c cloud control setup, my question is if there is a way to setup alerting/monitoring via 12c for checking blocking locks on all nodes and send out email notifications if there are any. I am not much familiar with 12c, please let me know and if its possible let me know the steps to set it up.

    Resolved by removing and re-adding the target...

  • My question is, when i bought my sons ipod I created the account with my email, the I purchased an ipod as well and used to same account.  I want him to have his own account so he can't access my itunes money.

    My question is, when I bought my sons ipod I created the account with my emai, then I purchased an ipod as well, so we share an account.  I want him off of my account.  How do you do that, he has his own computer.

    His own password for what? You can only have one password for one account.
    He can use your account for items and he can also use his own account. To purchase items with a different account you go to Settings>Store and sign out and sign into the other account.
    To update apps you have to sign into the account the purchased them.

Maybe you are looking for

  • MacBook Pro will not shut down

    A principal at my district has a MacBook Pro 15-inch Early 2008 (2.4/2X1GB/200-5400/256VRAM/AG) running OS 10.5.8 that will not shut down. When shut down is chosen, the computer restarts instead of shutting down. It does not matter how shut down is c

  • Urgent: How to export a Director cast member - in this case it's a flash movie?

    Hi there, I've got a problem - of course, that's why I'm here. My problem is that in my Director (version 11.5) movie a flash movie is member of the cast list (sorry, I only know the German terms and hope totranslate correctly!). In it's properties t

  • Accordian panel widget dysfunctionality

    Before I added an accordian panel widget, I pulled the content area on my page down to enlarge it vertically and allow enough room for panels to close and expand. It works fine if you leave "can close all" and "close all initially" options unchecked,

  • 404 error when trying to submit podcast but I'm able to subsribe via Advanced menu

    Okay, so first things first, here's the URL I'm using: http://www.spreaker.com/show/160815/episodes/feed I'm able to subscribe using other RSS feed programs and am also able to subscribe by going through the Advanced menu on iTunes. But when I try to

  • Query: `SEARCH` OPTION MISSING

    hi, i`ve got a 5th gen. 30 gb ipod (2006), the search and coverflow options are missing from it. i`ve restored and updated it, but still it doesn`t show these options, . how to fix it. kindly help.