Monitor object and synchronization of thread

When two or more than two threads are accessing common object then such object is known as monitor object or mutex (mutually exclusive object), monitor object always   shares common data in between two or more than two threads. Let us…