How does interaction between some app and OS happens?
by jinelcrimp8 from LinuxQuestions.org on (#54BVW)
I'm a software developer but working with high-level languages I've never really thought about how things work under the hood. Now, here's a particular question I would love to wrap my head around. If I read a file and my program in, let's say, C calls "fgets" to read a file what happens next? At which point OS gets involved? Is there a library loaded in memory and at some point my program knows that it needs to call a particular method from "file system library"? If so, how does my program know the address of the method from that other library? Sorry if some questions sound stupid. I'm just trying to understand how that bridging happens between my code and OS.

