   in computing, a system call is how a program requests a service from an operating system's kernel. this may include hardware related services (e.g. accessing the hard disk), creating and executing new processes, and communicating with integral kernel services (like scheduling). system calls provide an essential interface between a process and the operating system. == privileges == the design of the microprocessor architecture on practically all modern systems (except some embedded systems) involves a security model (such as the rings model) which specifies multiple privilege levels under which software may be executed; for instance, a program is usually limited to its own address space so that it cannot access or modify other running programs or the operating system itself, and a program is usually prevented from directly manipulating hardware devices (e.g. the frame buffer or network devices). however, many normal applications obviously need access to these components, so system calls are made available by the operating system to provide well-defined, safe implementations for such operations. the operating system executes at the highest level of privilege, and allows applications to request services via system calls, which are often executed via interrupts; an interrupt automatically puts the cpu into some required privilege level, and then passes control to the kernel, which determines whether the calling program should be granted the requested service. if the service is granted, the kernel executes a specific set of instructions over which the calling program has no direct control, returns the privilege level to that of the calling program, and then returns control to the calling program. == the library as an intermediary == generally, systems provide a library or api that sits between normal programs and the operating system. on unix-like systems, that api is usually part of an implementation of the c library (libc), such as glibc, that provides wrapper functions for the system calls, often named the same as the system calls they invoke. on windows nt, that api is part of the native api, in the ntdll.dll library; this is an undocumented api used by implementations of the regular windows api and directly used by some system programs on windows. the library's wrapper functions expose an ordinary function calling convention (a subroutine call on the assembly level) for using the system call, as well as making the system call more modular. here, th
Application_programming_interfaces Operating_system_technology System_calls