DLL is loaded into memory only once.
If there are several threads in a process that cause calls or access to globals in a DLL, the DLL should guarantee thread safety by protecting access to global / shared data using critical sections.
If there are multiple threads from multiple processes accessing a DLL, thread safety is not a problem if there is no more than one thread from a process accessing the same DLL.
The operating system skillfully manages memory so that initially it starts with just one copy of a section of code and data. The data section pages are read-only. When it becomes necessary to change any global data in one of the processes, the OS will receive a segmentation error and create a copy of the page and display it as being written to the process memory space. This approach is called copy-on-write.
source share