Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

n computing, a system call is how a program requests a service from an operating system's kernel that it

does not normally have permission to run. System calls provide the interface between a process and the
operating system. Most operations interacting with the system require permissions not available to a user
level process, e.g. I/O performed with a device present on the system, or any form of communication with
other processes requires the use of system calls.

Contents
[hide]

• 1 Privileges

• 2 The library as an

intermediary

• 3 Examples and tools

• 4 Typical implementations

• 5 References

• 6 External links

[edit]Privileges

The fact that improper use of the system call can easily cause a system crash necessitates some level of
control. The design of the microprocessor architecture on practically all modern systems (except some
embedded systems) offers a series of rings or CPU modes -- the (low) privilege level in which normal
applications execute limits the address space of the program so that it cannot access or modify other
running applications nor the operating system itself. It also prevents the application from directly using
devices (e.g. the frame buffer or networkdevices). But obviously many normal applications need these
abilities; therefore, pre-defined system calls are made available by the operating system. The operating
system executes at the highest level of privilege, and allows applications to request services via system
calls, which are often implemented through interrupts. If allowed, the system enters a higher privilege
level, executes a specific set of instructions over which the interrupting program has no direct control,
returns to the calling application's privilege level, then returns control to the calling application. This
concept also serves as a way to implement security.

With the development of separate operating modes with varying levels of privilege, a mechanism was
needed for transferring control safely from lesser privileged modes to higher privileged modes. Less
privileged code could not simply transfer control to more privileged code at any point and with any
processor state. To allow it to do so would allow it to break security. For instance, the less privileged code
could cause the higher privileged code to execute in the wrong order, or provide it with a bad stack.

You might also like