![]() You can see the documentation for the system calls on your system in section 2 of the manual. This includes access to files and hardware devices, networking, inter-process communication, privilege and memory management, etc. (Almost) any action that could affect other processes or that involves access to hardware outside the main CPU goes through the kernel and hence requires a system call. Unix provides isolation between processes, so it sets up the processor (specifically, the MMU) in such a way that each process can only access its own memory, and not the memory of other processes or the kernel. In a unix-like operating system (and in most OSes in general), this action is called a system call. There is a special CPU instruction that simultaneously switches the CPU to privileged mode and branches to a predefined address in memory. When a process wants to perform an operation that requires privileges, it has to invoke some kernel code to do it. ![]() Purely computational instructions such as integer operations and floating point operations do not require any privileged access, so they can be executed by ordinary processes. ![]() The details of what “privileged mode” means depends on the CPU architecture. The kernel is executed in privileged mode, ordinary processes are executed in unprivileged mode. There are a few CPU instructions that can only be executed in a privileged mode, mostly instructions related to accessing hardware outside the CPU including the RAM or to modifying some configurations. Executing a process executes CPU instructions by definition.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |