compiler interaction with OS I want know if compiler interacts with operating system during compilation process.And if yes then which part of compiler interacts with which part of operating system
Compilation is only a process of converting your code to assembly language. To achieve this task there is no need to interact with OS kernel.

If you also mean linking, interaction with OS is again not a requirement. However, if certain optimizations, or naming conventions and versions are involved, linking might access operating system information. Still, again no code is executed in the kernel level.