When a Java program starts up, several system threads are also started ... Is this why all Java c

Discussion in 'Java' started by Casey Hawthorne, Oct 27, 2006.

  1. When a Java program starts up, several system threads are also started
    without the programmer necessarily knowing about them.

    Is this why all Java classes have extra synchronization overhead
    associated with them even if you are not using threads in your own
    program?
    --
    Regards,
    Casey
    Casey Hawthorne, Oct 27, 2006
    #1
    1. Advertising

  2. Re: When a Java program starts up, several system threads are alsostarted ... Is this why all Java classes have extra synchronization overhead...

    On 27.10.2006 11:34, Casey Hawthorne wrote:
    > When a Java program starts up, several system threads are also started
    > without the programmer necessarily knowing about them.


    Right.

    > Is this why all Java classes have extra synchronization overhead
    > associated with them even if you are not using threads in your own
    > program?


    I do not know what you are referring to here. There are certainly some
    operations that need to be performed in a thread safe manner (i.e.
    loading of a class by a class loader). But normal instance and class
    methods do not suffer extra synchronization overhead unless you
    explicitly state so. (That would be quite inefficient btw.)

    Kind regards

    robert
    Robert Klemme, Oct 27, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,763
    Smokey Grindel
    Dec 2, 2006
  2. BILL
    Replies:
    4
    Views:
    681
    Arne Vajhøj
    Aug 1, 2008
  3. Icarus
    Replies:
    31
    Views:
    1,204
    Icarus
    Mar 13, 2009
  4. Javier H.
    Replies:
    2
    Views:
    143
    Javier H.
    May 8, 2011
  5. Jake Barnes
    Replies:
    2
    Views:
    299
Loading...

Share This Page