#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. 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s