A) I know that threads of a process share logical address space . Therefore they share data by default.
B) But if two threads of different processes want to share data ...then there are two options available ...message passing and shared memory
Are the synchronization methods (locks etc.) used for both types of communication? If they are only used for (B) then what about (A)? Two threads of same process can also lead to data inconsistency right ?