Linux-Locking Mechanisms – Concurrency and race conditions – part 2

The interested reader can check part 1 of this article in the link below

<Linux – Need for Locking Mechanisms – Part 1>

The below set of images provide an explanation on how concurrency and race conditions are handled in the computer.

FIG 1 : Value read from shared resource by Process 2 is wrong 

FIG 2 : Lock serializes access to Resource 1 – both Process 1 and Process 2 read proper values

Linux – Atomic Operations

Comments

  1. Pingback: Linux – Need for locking mechanisms- Concurrency and race conditions – part 1 | Hitch Hiker's Guide to Learning

Leave a Reply

Your email address will not be published. Required fields are marked *