title: How does a loader in operating system work?
body: <p>I know that a loader is a program which loads a program to the Main Memory. So,how does this actually works? What happens exactly? Actually when a loader loads a program, an entry in PCB is created and the program is put in a job pool. How the executable codes of a program are copied to the main memory? In simple how to load the codes of a file to the main memory using C or C++ ?</p>