I'm in a Linux environment even though I know this topic has a much broader scope
Let's say I'm writing a simple C program and I want to write "Hello" to the terminal. The obvious way is to use the C standard library printf which in turn uses the write system call (the wrapper function not the system call itself) which in turn calls the actual assembly syscall instruction (or int). The less obvious way is to use some inline assembly in my C source file or directly create an assembly file with the syscall instruction in it.
My questions
It seems like at the end of the day, one way or the other we end up with the system call (instruction syscall or int). Is this the only way?
Has the term Application the same meaning as User program has in the context of a modern PC?
Is it correct to say that PowerPoint, Google Chrome, Visual Studio Code, Photoshop or a C program I write are all examples of Applications/User programs that need system calls to request OS services for performing privileged operations like writing a file?
On a conventional operating system, yes, almost all OS services are requested through system calls. However, there can be a number of exceptions:
MRSinstruction to read the CPU type and features on AArch64. When user software executes such an instruction, a trap occurs. An operating system (such as FreeBSD) may emulate the missing instruction or execute it in a privileged context and then continue execution.There are other examples as well, but almost all interaction with the operating system indeed happens through system calls.