Interview Bootcamp
Vote

0% completed

Concurrency and Coordination

In a distributed system, many processes work at the same time, often on the same data. That creates three separate problems: controlling access, coordinating timing, and agreeing on what the data currently is.

Concurrency Control

Concurrency control manages simultaneous access to shared resources or data, so multiple processes can work efficiently without producing conflicts or inconsistencies.

Three techniques do it.

Locking. A lock restricts access to a shared resource or piece of data so that only one process can use it at a time

.....

.....

.....

Like the course? Get enrolled and start learning!
S

Shishir

· 2 years ago

Can you please elaborate on the difference between Strong Consistency and Linearizability? Thanks!

Simo

Simo

· 3 years ago

Both these strategies sounds like a process needs to wait for a condition to be met before proceeding. Can you give real-world examples for Barriers and Condition variables?

A

atomicdefinition

· 3 years ago

I'm a bit confused about the differences between them. It seems like "concurrency control" is all about synchronizing multiple processes or threads, which is basically the same as "synchronization."

Show 1 reply
D

dinko.osrecki

· 2 months ago

Isn't a mutex missing from the Synchronization list?

Also semaphores are really badly explained. Semaphores control how many threads can pass it and reach a resource pool. They can be either binary (open/closed), or counting semaphores (N > 1). Each thread that passes the semaphore increments the counter, and once N is reached other threads are blocked until one of existing threads exits the critical block and decrements the semaphore. Practical example is controlling access to the connection pool. Semaphores are like a capacity management tool.

Mutex, on the other hand, gives exclusive right to a single thread to access a resource. If many concertgoers are running to the toilet the first one that gets there will enter and lock it. Once they are done they will unlock it and the next one