Advantages of Object Synchronization over Resource Synchronization in Java
Main Article Content
Abstract
In java synchronization is basically of two types – First is , Method(Resource) synchronization and Second one is Block(Object) synchronization . Both of them adds to the security of code while multiple threads are in action and have very minute differences over one another. People often get confused with both of the ways and do not understand the usage and applicability of this ways by themselves[1]. Here I suggest that rather than using Method(Resource) synchronization for security of code in multithreading in java one must give preference to the Block(Object) synchronization .This paper is an Analytical as well as a Suggestive paper which actually describes both the ways with all minute differences covered with a proper analysis of usage and applicability, and then suggests that why one must use Block(Object) synchronization over Method(Resource) synchronization in java while multiple threads are in action.
Keywords: Synchronization , block , resource , object , method , Monitor , thread, sleep , join
Downloads
Article Details
COPYRIGHT
Submission of a manuscript implies: that the work described has not been published before, that it is not under consideration for publication elsewhere; that if and when the manuscript is accepted for publication, the authors agree to automatic transfer of the copyright to the publisher.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work
- The journal allows the author(s) to retain publishing rights without restrictions.
- The journal allows the author(s) to hold the copyright without restrictions.