Anonymous

What Is The Purpose Of Using System Calls?

2

2 Answers

raaga Profile
raaga answered
System calls provide an interface to communicate with the operating system kernel. Kernel is the core of the operating system and it facilitates the user programs by managing the hardware resources. Kernel provides a simple interface to the application programs to interact with the hardware and that interface is provided in the form of system calls. Basic system services such as accessing files and the communications amongst the processes are provided to the application programs via system calls.

Most languages provide library functions to provide theses functionalities and these library functions in turn sue system calls. For example, fread() and fwrite are the library functions that are equivalent to the 'read' and 'write' system calls in the Unix environment. The implementations of the systems may vary system-to-system however Standard library functions provide a standardized way that improves portability of the programs.

Whenever a program invokes a system call, it is interrupted and some information is saved that is used for restoring the program. CPU then starts executing in the kernel mode and a routine corresponding to the system call is executed. After the completion of that routine the control is transferred to the user mode and the program is restored.
Suhail Ajmal Profile
Suhail Ajmal answered
Providing the interface to communicate with the operating system kernal is called system call. Without system call, communication between operating system and hardware is not possible. Accessing the files and process communication is possible through system calls. Library functions provide system call functionalities.

Answer Question

Anonymous