#56 Critical Sections-Threads

Critical Section: Critical Section is a piece of code or a shared resource that  must not be accessed concurrently by different threads.

Problems(If CS is not handled):

1.Race Condition.

2.DeadLock

Mechanism to handle Critical Section:

1.Atomic Updates

2.Partitioning

3.Wait-Based Synchronization Protocol.