its data and code will be firstly loaded into those page cache, right?
Sim.
Whether does the OS just load some pieces of the code that will be use immediately when the program starts? Or OS load them all at once?
Algumas peças. Na verdade, quando o código realmente será executado - page_fault irá ocorrer, e a página será movida para a memória (page_cache) do arquivo associado
What kind of function of module does OS use to perform the code loading?
load_elf_binary link