1.

How Does Openmp Provide A Shared-memory Programming Environment.?

Answer»

OpenMP uses pragmas to CONTROL automatic creation of threads. Since the thread share the address space, they share memory. HOWEVER, they are ALLOWED a local view of the SHARED variables through “private” variables. The compiler allocates a variable-copy for each thread and OPTIONALLY initializes them with the original variable. Within the thread the references to private variable are statically changed to the new variables.

OpenMP uses pragmas to control automatic creation of threads. Since the thread share the address space, they share memory. However, they are allowed a local view of the shared variables through “private” variables. The compiler allocates a variable-copy for each thread and optionally initializes them with the original variable. Within the thread the references to private variable are statically changed to the new variables.



Discussion

No Comment Found