System Calls
System Calls:
System calls provide an interface between the process and the
operating system. System calls allow user-level processes to request some
services from the operating system which process itself is not allowed to do.
In handling the trap, the operating system will enter in the kernel mode, where
it has access to privileged instructions, and can perform the desired service
on the behalf of user-level process. It is because of the critical nature of
operations that the operating system itself does them every time they are
needed. For example: For input/output a process involves a system call telling
the operating system to read or write particular area and this request is
satisfied by the operating system.
System programs provide basic functioning to users so that they do
not need to write their own environment for program development (editors,
compilers) and program execution (shells).
Any single-CPU computer can execute only one instruction at a time. If process is running a user program in user mode and needs a system service, such as reading data from a file, it has to execute a trap instruction to transfer control to the operating system. The operating system then figures out what the calling process wants by inspecting the parameters. Then it carries out the system calls and return control to the instruction follow the system call. In a sense, making a system call is like making a special type of procedure call, only system calls enter the kernel and procedure calls do not.
Comments
Post a Comment
Thank you for message