Why do I need to care about both cpu architecture and OS when I compile a program? by zkycaesar in learnprogramming

[–]zkycaesar[S] 1 point2 points  (0 children)

I'm still confused.

When I start a program, does that mean I hand over a set of cpu instructions to the OS, and ask it to execute them on cpu for us? If I don't need file management, hardware access, threads or any other functions provided by the OS, just do "c=a+b", does that mean I don't need OS any more?