7

The Global Lockdown of Locks

 3 years ago
source link: http://lucteo.ro/2020/08/06/global-lockdown-of-locks/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
The Global Lockdown of Locks

The Global Lockdown of Locks

In my previous Overload article I showed how one can achieve great speedups using tasks as the foundation for concurrent programming instead of locks. The one thing that is not clear is whether one can use tasks for all the concurrent algorithms. Tasks may be applicable to certain types of problem, but not to all problems. This article tries to complete the picture by showing that all algorithms can use tasks and there is no need for locks.

The article proves that one can find a general algorithm for implementing all concurrent algorithms just by using a task system, without the need for locks or other synchronisation primitives in user code. It also gives some ideas on how to replace locks with abstractions based on tasks.

Hopefully, by the end of the article, the reader will be convinced that locks should not be used in day-to-day problems but instead should be confined to use by experts when building concurrent systems.

Please refer to the Overload article:

Keep truthing!

Image credits:

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK