Thread - Shared Variable

> Operating System - Kernel (Windows, Unix, Linux) > OS - Process (Task)

1 - About

shared state in threads.

Threads communicate primarily by sharing access to fields and the objects reference fields refer to. This form of communication is extremely efficient, but makes two kinds of errors possible:

The tool needed to prevent these errors is synchronization.

Function Programming Language characteristics like immutability and no side-effects are extremely helpful while writing multi-threaded code because developers doesn't to worry about synchronizing of the state.

3 - Coordination

Threads often have to coordinate their actions. The most common coordination idiom is the guarded block.

os/process/shared_variable.txt · Last modified: 2018/12/19 20:31 by gerardnico