Beruflich Dokumente
Kultur Dokumente
html (Concurrency
Patterns Nice)
http://javarevisited.blogspot.in/2011/06/volatile-keyword-java-example-
tutorial.html#at_pco=smlwn-1.0&at_si=58777c4fa17829dd&at_ab=per-2&at_pos=0&at_tot=1
http://www.uml-diagrams.org/examples/java-6-thread-state-machine-diagram-
example.html
http://www.javaworld.com/article/2074217/java-concurrency/java-101--understanding-
java-threads--part-1--introducing-threads-and-runnables.html
http://www.javaworld.com/article/2074318/java-concurrency/java-101--understanding-
java-threads--part-2--thread-synchronization.html
http://www.javaworld.com/article/2071214/java-concurrency/java-101--understanding-
java-threads--part-3--thread-scheduling-and-wait-notify.html
http://www.javaworld.com/article/2074481/java-concurrency/java-101--understanding-
java-threads--part-4---thread-groups--volatility--and-threa.html
http://www.javaworld.com/article/2078809/java-concurrency/java-concurrency-java-
101-the-next-generation-java-concurrency-without-the-pain-part-1.html
http://www.javaworld.com/article/2078848/java-concurrency/java-concurrency-java-
101-the-next-generation-java-concurrency-without-the-pain-part-2.html
https://books.google.co.in/books?
id=vNPW8Btqxk4C&pg=PA497&lpg=PA497&dq=synchronization:
+coordinating+activities+and+data+access+among+multiple+threads&source=bl&ots=fpXui
arATZ&sig=H82E4FJvAcRHY9stVjt7Dmev67Q&hl=en&sa=X&ved=0ahUKEwiS_6Tjo7nQAhUaSY8KHbuVC
uwQ6AEINTAE#v=onepage&q=synchronization%3A%20coordinating%20activities%20and%20data
%20access%20among%20multiple%20threads&f=false
http://www.nakov.com/inetjava/lectures/part-1-sockets/InetJava-1.3-
Multithreading.html
https://www.safaribooksonline.com/library/view/learning-java-
4th/9781449372477/ch09s03.html
http://www.di.ase.md/~aursu/JavaThreadsSynchronization.html
synchronization among threads in Java is to serialize their access to some
resource
http://www.javaworld.com/article/2076971/java-concurrency/how-the-java-virtual-
machine-performs-thread-synchronization.html
In Java language terminology, the coordination of multiple threads that must access
shared data is called synchronization. The language provides two built-in ways to
synchronize access to data: with synchronized statements or synchronized methods.
My notes; What is that Cordination?
Executing threads one after another which is decided by JVM .That is
serializing threads to access shared objects .
Synchronizing Threads
https://www.cs.princeton.edu/courses/archive/spr96/cs333/java/tutorial/java/threads
/synchronization.html
So far, this lesson has contained examples with independent, asynchronous threads.
That is, each thread contained all of the data and methods required for its
execution and didn't require any outside resources or methods. In addition, the
threads in those examples ran at their own pace without concern over the state or
activities of any other concurrently running threads.
However, there are many interesting situations where separate concurrently running
threads do share data and must consider the state and activities of those other
threads. One such set of programming situations are known as Producer/Consumer
scenarios where the Producer generates a stream of data which then is consumed by a
Consumer.
For example, you can imagine a Java application where one thread (the producer)
writes data to a file while a second thread (the consumer) reads data from the same
file. Or, as you type characters on the keyboard, the producer thread places key
events in an event queue and the consumer thread reads the events from the same
queue. Both of these examples use concurrent threads that share a common resource:
a file, an event queue. And because the threads share a common resource, they must
be synchronized in some way
http://javafinalize.blogspot.in/search/label/monitor
https://en.wikipedia.org/wiki/Synchronization_(computer_science)
http://www.careerride.com/Java-what-is-synchronization.aspx
https://www.techopedia.com/definition/13390/synchronization-dot-net
http://www.ibm.com/developerworks/java/tutorials/j-threads/j-threads.html
http://www.mijnadres.net/published/Monitor%20Object%20Pattern.pdf (Nice)
http://www.slideshare.net/charsyam2/monitor-object
http://www.waitingforcode.com/java-concurrency/object-monitor-pattern/read
https://www.coursehero.com/file/p7dbu45/Apply-the-Monitor-Object-pattern-to-
synchronize-the-shared-queue-efficiently/
https://sudo.ch/unizh/concurrencypatterns/ConcurrencyPatterns.pdf
http://nob.cs.ucdavis.edu/classes/ecs150-2008-02/handouts/sync/sync-problems.html
https://www.youtube.com/watch?v=_5sbBARRpws
https://www.youtube.com/watch?v=oAvDV7LSay0
https://www.youtube.com/watch?v=s8_ZxcG7Jco&list=PLbu9W4c-C0iAGUc7dQlqXIsXkGnHMaTEz
https://www.youtube.com/watch?v=1S5kqkLFxYk (Normalization)
http://nob.cs.ucdavis.edu/classes/ecs150-2008-02/handouts/sync/sync-problems.html
https://www.youtube.com/watch?
v=jj6PzIWXQ1M&list=PLTLvfz4k7GEtMG2Vmqgd8CXrMQ1tqw1zc&index=4
https://www.youtube.com/watch?v=_5sbBARRpws&t=293s
https://www.youtube.com/watch?v=15Q8PILXkQ0
https://www.youtube.com/watch?v=VWeyrtcFEI0
https://www.youtube.com/watch?v=6gS1TH6xTAY&list=PLgre7dUq8DGKbtnlMuJPvPYlvLdXOC9uh
https://www.youtube.com/watch?v=p0SKPpC5r9U
https://www.youtube.com/watch?v=rCiQc3ife90&t=448s
https://www.youtube.com/watch?v=Z12R-FMtods
https://www.youtube.com/watch?
v=_vfZhdTgA5A&list=PLTLvfz4k7GEtMG2Vmqgd8CXrMQ1tqw1zc&index=6
___________________________________________________________________________________
_____________________________________________________________________________
What is Concurrency?
https://www.reference.com/technology/concurrency-operating-systems-
9b9363bea4e5629c#
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
--------------
Active Object,
Monitor Object, (https://en.wikipedia.org/wiki/Monitor_(synchronization))
Half-Sync/Half-Async,
Leader/Followers,
Thread-Specific Storage.
The choice of concurrency architecture has a significant impact on the design and
performance of multi-threaded networking middleware and applications. No single
concurrency
architecture is suitable for all workload conditions and hardware and software
platforms. The patterns in this chapter therefore collectively provide solutions to
a variety of
concurrency problems.
The first two patterns described below specify designs for sharing resources among
multiple threads or processes:
The Active Object design pattern decouples method execution from method invocation.
Its purpose is to enhance concurrency and simplify synchronized access to objects
that reside in their own threads of control
-->Both above patterns can synchronize and schedule methods invoked concurrently on
objects. The main difference is that an active object executes its methods in a
different thread than its clients, whereas a monitor object executes its
methods by borrowing the thread of its clients. As a result active objects can
perform more sophisticated--albeit expensive--scheduling to determine the order in
which their methods execute.
The Thread-Specific Storage design pattern allows multiple threads to use one
`logically global' access point to retrieve an object that is local to a thread,
without incurring locking overhead on each access to the object. To some extent
this pattern can be viewed as the `antithesis' of the other patterns in this
section, because it addresses several inherent complexities of concurrency by
preventing the sharing of resources among threads.
https://en.wikipedia.org/wiki/Synchronization_(computer_science)
For example, suppose that there are three processes namely, 1, 2 and 3. All three
of them are concurrently executing and they need to share a common resource
(critical section) as shown in Figure 1. Synchronization should be used here to
avoid any conflicts for accessing this shared resource. Hence, when Process 1 and 2
both try to access that resource it should be assigned to only one process at a
time. If it is assigned to Process 1, the other process (Process 2) needs to wait
until Process 1 frees that resource (as shown in Figure 2
Other than mutual exclusion, synchronization also deals with the following:
deadlock, which occurs when many processes are waiting for a shared resource
(critical section) which is being held by some other process. In this case the
processes just keep waiting and execute no further;
starvation, which occurs when a process is waiting to enter the critical section
but other processes monopolize the critical section and the first process is forced
to wait indefinitely;
priority inversion, which occurs when a high priority process is in the critical
section, it may be interrupted by a medium priority process. This violation of
priority rules can happen under certain circumstances and may lead to serious
consequences in real-time systems;
busy waiting, which occurs when a process frequently polls to determine if it has
access to a critical section. This frequent polling robs processing time from other
processes.
Classic problems of synchronization[edit]
The following are some classic problems of synchronization:
http://berb.github.io/diploma-thesis/original/023_concurrency.html#syncoord
https://www.dre.vanderbilt.edu/~schmidt/cs282/PDFs/Concurrency-and-Synchronization-
parts6-and-7.pdf
http://jeremymanson.blogspot.in/2007/08/atomicity-visibility-and-ordering.html
http://sce.uhcl.edu/helm/rationalunifiedprocess/process/workflow/ana_desi/co_cncry.
htm
http://courses.cs.vt.edu/~cs5204/fall00/monitor.html
Monitors were first proposed by Brinch Hansen (1) and later refined by Hoare (2).
Monitors provide a structured concurrent programming primitive, which is used by
processes to ensure exclusive access to resources, and for synchronizing and
communicating among users. A monitor module encapsulates both a resource definition
and operations/ procedures that exclusively manipulate it. Those procedures are the
gateway to the shared resource and called by the processes to access the resource.
Only one call to a monitor procedure can be active at a time and this protects data
inside the monitor from simultaneous access by multiple users. Thus mutual
exclusion is enforced among tasks using a monitor. Processes that attempt monitor
entry while the monitor is occupied are blocked on a monitor entry queue.
A condition variable is associated with a queue of the processes that are currently
waiting on that condition. First-in-first-out (FIFO) discipline is generally used
with queues, but priority queues can also be implemented by specifying the priority
of the process to be delayed as a parameter in the wait operation. (Condition
variables are assumed to be fair in the sense that a process will not remain
suspended forever on a condition variable that is signaled infinitely often.)
Therefore, monitors allow flexibility in scheduling of the processes waiting in
queues.
https://www.techopedia.com/definition/13390/synchronization-dot-net
Java supports multiple threads to be executed. This may cause two or more threads
to access the same fields or objects. Synchronization is a process which keeps all
concurrent threads in execution to be in synch. Synchronization avoids memory
consistence errors caused due to inconsistent view of shared memory. When a method
is declared as synchronized; the thread holds the monitor for that method's object
If another thread is executing the synchronized method, your thread is blocked
until that thread releases the monitor.
https://en.wikipedia.org/wiki/Monitor_(synchronization)
https://www.javacodegeeks.com/2015/09/concurrency-fundamentals-deadlocks-and-
object-monitors.html
http://math.hws.edu/eck/cs124/javanotes6/c12/s1.html
http://web.mit.edu/6.005/www/fa14/classes/18-thread-
safety/#reading_18_thread_safety (Thread Safety and 4 ways of acheiving Thread
Safet in java)
http://www.vogella.com/tutorials/JavaConcurrency/article.html
http://geekexplains.blogspot.in/2008/07/threadstate-in-java-blocked-vs-waiting.html
http://www.uml-diagrams.org/examples/java-6-thread-state-machine-diagram-
example.html
http://mrbool.com/working-with-java-executor-framework-in-multithreaded-
application/27560
https://www.youtube.com/channel/UCrXzgNQ6RV3Xm8kMTvEYnBw/videos
http://www.javadiscover.blogspot.in/search/label/Threads
http://www.javatpoint.com/static-synchronization-example
http://www.javatpoint.com/inter-thread-communication-example
http://www.avajava.com/tutorials/lessons/how-do-i-use-a-synchronized-block-in-a-
static-method.html
http://baptiste-wicht.com/posts/2010/09/java-concurrency-part-5-monitors-locks-and-
conditions.html
http://howtodoinjava.com/2013/07/18/when-to-use-countdownlatch-java-concurrency-
example-tutorial/
http://baptiste-wicht.com/posts/2010/09/java-concurrency-part-5-monitors-locks-and-
conditions.html
http://howtodoinjava.com/2013/07/18/when-to-use-countdownlatch-java-concurrency-
example-tutorial/
http://examples.javacodegeeks.com/core-java/util/concurrent/executorservice/java-
executorservice-example-tutorial/
http://www.javacodegeeks.com/2012/08/java-concurrency-cyclicbarrier-example.html
http://www.javacodegeeks.com/2011/09/java-concurrency-tutorial-callable.html
http://www.javacodegeeks.com/2011/09/java-concurrency-tutorial-reentrant.html
http://examples.javacodegeeks.com/core-java/util/concurrent/threadfactory/java-
util-concurrent-threadfactory-example/
http://javarevisited.blogspot.in/2015/01/how-to-use-future-and-futuretask-in-
Java.html
http://technologyrants.blogspot.in/2013/03/concurrent-programming-concepts-in-
java.html (With Example Traffic Light Example)
http://jsug.at/w/images/7/71/JSUG-Slides_EffectiveJavaPuzzlers_Christoph_Pickl.pdf
http://javadecodedquestions.blogspot.in/2012/01/java-concurrency.html
https://javainterviewsquestions.wordpress.com/category/java-concurrency/
http://www.java-success.com/scenarios-java-multithreading-interview-questions/
http://www.careercup.com/page?pid=threads-interview-questions
http://crackingjavainterviews.blogspot.in/2013/04/top-interview-questions-for-
investment.html
http://crackingjavainterviews.blogspot.in/2015/02/how-would-you-count-word-
occurrence-in.html
http://crackingjavainterviews.blogspot.in/2013/04/cracking-core-java-
interviews.html
http://crackingjavainterviews.blogspot.in/2013/04/cracking-core-java-
interviews.html ( nice
http://www.cloudsopedia.com/interviewquestions/corejava/java-fundamentals-2.php
http://howtodoinjava.com/2013/07/18/when-to-use-countdownlatch-java-concurrency-
example-tutorial/
http://knowledgesun.com/core-java-multithreading-interview-questions/
http://knowledgesun.com/core-java-multithreading-interview-questions/
http://javahungry.blogspot.com/2014/04/fail-fast-iterator-vs-fail-safe-iterator-
difference-with-example-in-java.html
http://javahungry.blogspot.com/2013/10/count-total-number-of-times-each-alphabet-
appears-in-the-string.html
http://javabuddy.hubpages.com/hub/10-advanced-Java-Concurrency-Interview-question-
answers
http://javabuddy.hubpages.com/hub/What-is-PATH-and-CLASSPATH-in-Java-set-Windows-
Unix-Linux
http://javabuddy.hubpages.com/hub/How-to-sort-Vector-in-Java-Ascending-Descending-
Order-Example
http://www.slideshare.net/hirist/top-100-java-interview-questions-and-answers
(Nice)
https://www.kifi.com/antonio-vidalgarc%C3%ADa/java-concurrency
http://amit.softcaretech.in/blog/java-multithreading-interview/
http://www.javamadesoeasy.com/2015/03/thread-concurrency-top-50-interview.html
http://javarevisited.blogspot.sg/2014/06/how-to-create-custom-exception-in-
java.html
http://www.programcreek.com/2014/02/how-to-make-a-method-thread-safe-in-java/
http://blog.csdn.net/schen6/article/details/16341233
http://crunchify.com/hashmap-vs-concurrenthashmap-vs-synchronizedmap-how-a-hashmap-
can-be-synchronized-in-java/
http://www.javapandit.net/java-best-questions1.html
http://crackingjavainterviews.blogspot.in/2013/04/cracking-core-java-
interviews.html
https://books.google.co.in/books?
id=GMEtBAAAQBAJ&printsec=frontcover#v=onepage&q&f=false
http://crackingjavainterviews.blogspot.in/2013/04/cracking-core-java-
interviews.html
http://www.slideshare.net/choksheak/advanced-introduction-to-java-multi-threading-
full-chok
http://www.slideshare.net/caroljmcdonald/java-concurrency-memory-model-and-trends-
4961797
http://www.slideshare.net/rajeshanandakumar/java-multithreading-and-concurrency
http://www.nakov.com/inetjava/lectures/part-1-sockets/InetJava-1.3-
Multithreading.html
http://coderevisited.com/thread-pool-in-java/
http://www.dailyfreecode.com/code/thread-priority-2059.aspx
https://www.artima.com/insidejvm/ed2/threadsynchP.html
https://dzone.com/articles/java-volatile-keyword-0
http://www.javatpoint.com/join()-method
Mutual Exclusion
http://howtodoinjava.com/2015/01/06/how-to-use-locks-in-java-java-util-concurrent-
locks-lock-tutorial-and-example/
http://howtodoinjava.com/2013/03/12/java-executor-framework-tutorial-and-best-
practices/
https://docs.oracle.com/javase/specs/jls/se6/html/j3TOC.html
https://docs.oracle.com/javase/specs/jls/se6/html/memory.html
https://docs.oracle.com/javase/specs/jls/se6/html/j3TOC.html
https://docs.oracle.com/javase/specs/jls/se6/html/j3TOC.html
https://docs.oracle.com/javase/6/docs/
A monitor is an instance of a class that can be used safely by several threads. All
the methods of a monitor are executed with mutual exclusion. So at most one thread
can execute a method of the monitor at the same time.
http://stackoverflow.com/questions/3047564/java-synchronized-method-lock-on-object-
or-method
http://tutorials.techmytalk.com/2014/07/03/synchronization/
http://crunchify.com/what-is-lock-unlock-reentrantlock-trylock-and-how-its-
different-from-synchronized-block-in-java/
http://javarevisited.blogspot.in/2013/03/reentrantlock-example-in-java-
synchronized-difference-vs-lock.html
https://www.youtube.com/watch?v=3hg6-OQUNY0 (Nice)
http://baptiste-wicht.com/posts/2010/09/java-concurrency-part-5-monitors-locks-and-
conditions.html
http://baptiste-wicht.com/categories/concurrency.html
http://baptiste-wicht.com/posts/2010/09/java-synchronization-mutual-exclusion-
benchmark.html
http://www.montefiore.ulg.ac.be/~pw/cours/psfiles/struct-cours7-e.pdf
http://www.coderanch.com/t/516096/threads/java/monitor-Java-multi-thread-
programming
http://www.artima.com/insidejvm/ed2/threadsynch.html
http://www.coderanch.com/t/497902/threads/java/Java-Thread-object-monitor-fit
http://baptiste-wicht.com/posts/2010/09/java-concurrency-part-5-monitors-locks-and-
conditions.html
http://howtodoinjava.com/2013/03/12/java-executor-framework-tutorial-and-best-
practices/
http://howtodoinjava.com/2015/01/06/how-to-use-locks-in-java-java-util-concurrent-
locks-lock-tutorial-and-example/
http://howtodoinjava.com/2013/03/08/thread-synchronization-object-level-locking-
and-class-level-locking/
http://javarevisited.blogspot.in/2014/10/how-to-use-locks-in-multi-threaded-java-
program-example.html
http://javarevisited.blogspot.in/2014/10/how-to-use-locks-in-multi-threaded-java-
program-example.html (Using locks)
http://javarevisited.blogspot.sg/2013/12/inter-thread-communication-in-java-wait-
notify-example.html
http://stackoverflow.com/questions/5861894/how-to-synchronize-or-lock-upon-
variables-in-java
http://www.javaworld.com/article/2078848/java-concurrency/java-concurrency-java-
101-the-next-generation-java-concurrency-without-the-pain-part-2.html
https://www.youtube.com/playlist?list=PLZ9NgFYEMxp4KSJPUyaQCj7x--NQ6kvcX
https://www.youtube.com/watch?v=YdlnEWC-7Wo&list=PLBB24CFB073F1048E
http://javarevisited.blogspot.in/2011/04/synchronization-in-java-synchronized.html
(Nice overview)
http://stackoverflow.com/questions/3047564/java-synchronized-method-lock-on-object-
or-method (Nice diffeence between static block and static method)
phareddy@in.ibm.com - Phani
http://tutorials.techmytalk.com/2014/07/03/synchronization/
phareddy@in.ibm.com - Phani
http://whaticode.com/2012/05/21/lock-mechanisms-in-java/
http://www.javaexperience.com/what-is-singleton-pattern-and-how-to-make-it-
threadsafe/
http://www.javaexperience.com/page/5/?s=Threads
http://www.quora.com/What-do-we-mean-by-saying-a-class-level-lock-is-a-taken-by-a-
thread-on-the-java-lang-Class-instance-associated-with-a-Java-class ( nice)
http://programmers.stackexchange.com/questions/206732/how-to-make-a-method-
synchronized-across-all-instances-of-an-object
http://crackingjavainterviews.blogspot.in/2013/04/cracking-core-java-
interviews.html
http://www.journaldev.com/1061/java-synchronization-and-thread-safety-tutorial-
with-examples
http://www.journaldev.com/1050/java-timer-and-timertask-example-tutorial
http://www.journaldev.com/1079/java-thread-tutorial
http://www.javamex.com/tutorials/wait_notify_how_to.shtml
https://www.youtube.com/watch?v=q-DuzRHWCj4
https://www.youtube.com/watch?v=dk3Iiqof6jA
https://www.youtube.com/watch?v=fITuhLSwbt8
https://www.youtube.com/watch?v=Zfmk0GtANNs
https://www.youtube.com/user/MargretPosch/videos (nice)
https://www.youtube.com/watch?v=IBPGUSrW1Po
https://www.youtube.com/watch?v=zwocnEB9_1I&list=PL-8TVnCXtjy_xg_3qr4j5tn5qRrI-1wBQ
https://www.youtube.com/user/MargretPosch/videos
http://www.programcreek.com/2011/12/monitors-java-synchronization-mechanism/
http://www.programcreek.com/2011/12/monitors-java-synchronization-mechanism/
(monitor and semaohore
https://en.wikipedia.org/wiki/Monitor_(synchronization)
http://www.csc.villanova.edu/~mdamian/threads/javamonitors.html
http://www.javacreed.com/understanding-threads-monitors-and-locks/
http://www.cmi.ac.in/~madhavan/courses/pl2009/lecturenotes/lecture-
notes/node64.html
http://www.uml-diagrams.org/examples/java-6-thread-state-machine-diagram-
example.html
https://mishrabagish.wordpress.com/2012/12/17/explicit-vs-intrinsic-locks-in-java-
ensuring-thread-scheduling-fairness/
http://blog.takipi.com/5-things-you-didnt-know-about-synchronization-in-java-and-
scala/
http://www.javamadesoeasy.com/2015/03/acquiring-lock-on-class-2-ways-to.html
http://www.javamadesoeasy.com/2015/03/difference-between-object-lock-and.html
http://www.javamadesoeasy.com/p/data-structures.html
http://howtodoinjava.com/2013/03/08/thread-synchronization-object-level-locking-
and-class-level-locking/
http://www.nyu.edu/classes/jcf/g22.3033-007_sp01/handouts/g22_3033_h53.htm
https://books.google.co.in/books?
id=O6fJBAAAQBAJ&pg=PA97&lpg=PA97&dq=every+java+object+has+a+monitor+means+what&sour
ce=bl&ots=YhjHg2NIdE&sig=3lSFyV2WGcPu14F_U7EHeuh336c&hl=en&sa=X&ved=0CFAQ6AEwCGoVCh
MI4v-KkJv-xgIVA-KmCh1z_Q1K#v=onepage&q=every%20java%20object%20has%20a%20monitor
%20means%20what&f=false
https://www.artima.com/insidejvm/ed2/threadsynch.html
http://www.javaworld.com/article/2074318/java-concurrency/java-101--understanding-
java-threads--part-2--thread-synchronization.html
https://books.google.co.in/books?id=2pKCnc6-
UAEC&pg=PA44&lpg=PA44&dq=Each+object+in+Java+is+associated+with+a+monitor+means+wha
t&source=bl&ots=BTgnlxnVIR&sig=dviFL4oNclQ1MyRHey0IqN7s5Jw&hl=en&sa=X&ved=0CDoQ6AEw
BjgeahUKEwjT68D8nf7GAhXCLKYKHSTKC98#v=onepage&q=Each%20object%20in%20Java%20is
%20associated%20with%20a%20monitor%20means%20what&f=false
see the above book page no 42 section 3.3 for condition syncrnization that is
wiat/notify alll
http://www.jchq.net/certkey/index.htm
https://www.bionicspirit.com/blog/2013/03/14/jvm-multithreading-monitor-locks-
visibility.html
http://stackoverflow.com/questions/3362303/whats-a-monitor
https://en.wikipedia.org/wiki/Monitor_%28synchronization%29
http://docs.oracle.com/javase/specs/jls/se6/jls3.pdf
http://lass.cs.umass.edu/~shenoy/courses/fall10/lectures/Lec09_notes.pdf
http://www.programcreek.com/2011/12/monitors-java-synchronization-mechanism/
http://cs.nyu.edu/~lerner/spring12/Preso03-JavaPrimitives.pdf
http://simone-folino.blogspot.in/2012/05/implicit-lock-object-lock-and-class.html
http://www.dineshonjava.com/2013/05/static-synchronization-non-
static.html#.Vbe0D_mqqko
http://winterbe.com/posts/2015/04/30/java8-concurrency-tutorial-synchronized-locks-
examples/
https://www.artima.com/insidejvm/ed2/threadsynch.html
https://books.google.co.in/books?
id=rCf0yySWJKUC&pg=PA210&lpg=PA210&dq=what+does+monitor+in+java+thread+means&source
=bl&ots=I_JEJivUm_&sig=lerHzh3d5LFu-
EbMKG9940b8C8Q&hl=en&sa=X&ved=0CEMQ6AEwBjgeahUKEwisxqHQ8f_GAhWJz4AKHfNVBoQ#v=onepag
e&q=what%20does%20monitor%20in%20java%20thread%20means&f=false
http://javarevisited.blogspot.in/2011/06/volatile-keyword-java-example-
tutorial.html
http://www.programmerinterview.com/index.php/operating-systems/example-of-
threading-and-synchronization-2/
http://www.programmerinterview.com/index.php/operating-systems/monitors-vs-
semaphores/
http://www.somanyword.com/2014/06/what-is-reentrant-synchronization-or-locking-in-
java/
http://www.careerride.com/Java-what-is-synchronization.aspx
https://books.google.co.in/books?
id=JPbJLQTs1IYC&pg=PA256&lpg=PA256&dq=monitor+and+synchronized+keyword+in+java+thre
ad&source=bl&ots=Nv6bPkoLBz&sig=im0aKN35MctXqQLgMoyklkexlbY&hl=en&sa=X&ved=0CEYQ6AE
wBzgUahUKEwiNnMLFzIDHAhVYkI4KHXkuCUo#v=onepage&q=monitor%20and%20synchronized
%20keyword%20in%20java%20thread&f=false
https://books.google.co.in/books?
id=JPbJLQTs1IYC&pg=PA256&lpg=PA256&dq=monitor+and+synchronized+keyword+in+java+thre
ad&source=bl&ots=Nv6bPkoLBz&sig=im0aKN35MctXqQLgMoyklkexlbY&hl=en&sa=X&ved=0CEYQ6AE
wBzgUahUKEwiNnMLFzIDHAhVYkI4KHXkuCUo#v=onepage&q=monitor%20and%20synchronized
%20keyword%20in%20java%20thread&f=false
https://en.wikipedia.org/wiki/Monitor_(synchronization)
https://mishrabagish.wordpress.com/2012/12/17/explicit-vs-intrinsic-locks-in-java-
ensuring-thread-scheduling-fairness/ (Abou types of locks in java theads)
https://mishrabagish.wordpress.com/category/spring/
http://toodey.com/2015/07/30/what-is-combiner-in-mapreduce-combiner-in-depth-
mapreduce-framework/
http://www.javaworld.com/article/2076949/learn-java/how-the-java-virtual-machine-
handles-method-invocation-and-return.html?page=2
https://plumbr.eu/blog/locked-threads/classloading-and-locking
When ever JVM encouter snchronized JVM creates a lock and it should handover that
lock to a JAvaObject.This java object has lock.Every thread has to obtain a lock to
enter a syncronzed method from that object.That object is called monitor in context
of inercomunication b/w threads
So a Monitor is any java object which JVM requires to handover the lock
THat monitor has ability to hold threads and also give notification to other thread
https://www.artima.com/insidejvm/ed2/threadsynch.html
https://books.google.co.in/books?
id=uoXYzogG1pEC&pg=PA203&lpg=PA203&dq=java+threads+monitors+explained&source=bl&ots
=xhxyZhYBiC&sig=V93It7FpPjGJbhYbxAbjaltqSFs&hl=en&sa=X&ved=0CEgQ6AEwCDhaahUKEwjyu7S
7wYXHAhWGJaYKHZIvAgE#v=onepage&q=java%20threads%20monitors%20explained&f=false
http://www.cs.princeton.edu/courses/archive/fall09/cos318/lectures/SemaphoresMonito
rs.pdf
http://www.cs.utexas.edu/users/witchel/372/lectures/08.Semaphore-Monitors.pdf
http://lass.cs.umass.edu/~shenoy/courses/fall08/lectures/Lec10.pdf
https://doc.qt.io/archives/qq/qq21-monitors.html
http://inheritingjava.blogspot.in/p/multithreading-advanced-concepts.html
http://www.javatbrains.com/2014/07/threads.html
http://www.javaworld.com/article/2071214/java-concurrency/java-101--understanding-
java-threads--part-3--thread-scheduling-and-wait-notify.html
12:31:08 PM
http://www.javaworld.com/article/2078679/java-concurrency/java-concurrency-modern-
threading-for-not-quite-beginners.html?page=2
Mutual Exclusion means once a thread acquires lock,other threads have to wait until
owner of lock releases lock.
Mutual Exclusion means avoid other thread to use a shared resource until other
thread finished using that shared resource
So mutual exclusion means while one thread is executing set of instruction which
are shared to othr threads,other thred have to wait until executing threa finishs
executing set of instructions
http://tutorials.jenkov.com/java-concurrency/java-memory-model.html
http://www.slideshare.net/michalwarecki/java-memory-model-23207253
http://jeremymanson.blogspot.in/2008/11/what-volatile-means-in-java.html#