Skip to main content

Posts

Showing posts with the label Livelock

Thread Synchronization Related Problems

Thread Synchronization Related Problems -           Deadlocks : Occurs when two threads wait for each other and suspend indefinetly. To a deadlock to occur each thread must own a resource and wait for release of the other resource to advance.  Which means neither of the threads relase its resource and none of them continues its execution. To avoid deadlocks thread execution shuould be designed in a such a way that threads obtain resources in the same order. So that a situation that a thread waiting for release of other resource never occurs. -           Livelock : Happens when a thread acts in respond to act of another thread and other thread acts similiarly, acts in respond to act ot other thread. This way threads keeps busy each other preventing each other from doing  their actual work, thus producing nothing. -           Starva...