A system call is programming interface for an application to request service from the operating system. Generally, operating systems provide a library (or high-level Application Program Interface or API) that sits between normal programs and the rest of the operating system, such as the POSIX library for managing processes in Linux. This library handles the low-level details of passing information to the kernel and switching to supervisor mode, as well as any data processing and preparation which does not need to be done in privileged mode. Ideally, this reduces the coupling between the operating system and the application, and increases portability. Many of today’s operating systems have hundreds of system calls. For example, Linux has 319 different system calls. FreeBSD has about the same (almost 330). Writing applications that utilize libraries instead of system calls can simplify development and make it easier to deploy software to different operating systems. Implementing system calls requires a control transfer which involves some sort of architecture specific feature. Typically, each system call is associated with a number. When a system call is made, it triggers a software interrupt or trap which uses the number to find the proper system call in a lookup table. Interrupts transfer control to the kernel so software simply needs to set up some register with the system call number they want and execute the software interrupt. The caller of the system call doesn’t need to know anything about how the system call was implemented. The details of the OS implementation are generally hidden from the programmer (who simply need to follow the API).