What is a System Call?
It acts as an interface between the process and the operating system. When the execution of the program starts in the computer, the main programs of the operating system are executed first.
After this, the operating system takes control of all the hardware like hard disk, processor, RAM, etc. If the user has to do any work from the operating system, then a system call is required for that.
It is the low-level processing done by the user-level operating system on its own. Generally, the operating system performs many small and important tasks to benefit the user.
For example, while installing any program, create a directory to keep its file organized. This work is tied up with the operating system, and the operating system does this type of work through system calls.
The working of the system call can be understood from the following diagram:

Types of System calls (types of system calls):
System calls can be divided into the following 5 groups:
1) File Control:
Generally, this type of Application Program Interface is provided by all operating systems, in which common file-related tasks such as opening, closing, creating, reading, writing, deleting, and renaming are automated.
2) Process Control:
When any type of program execution is being done by the operating system, then a situation comes when its execution has to be terminated.
Termination is of two types, one is normal termination and the other is abnormal termination. If there is abnormal termination then some of its unnecessary files remain in RAM which is removed by an OS system call.
3) Device Control:
Here all resources like a keyboard, monitor, video card, sound card, etc can be controlled by the system call. Generally, the process requires resources if the resource is available. So system call controls it and informs the user so that he can use them.
4) Information Control:
Some system calls are always available for such communication between the user and the operating system. Like getting information about the date and time. At present operation systems are available which keep information about each processing of the system through system calls.
5) Communication
Both the message-passing model and the shared memory model are the techniques used for communication. In the first model, the common mailbox is used while in the second the memory is shared through system calls. Through this, the work of reading or writing information is done.
Read Also - What is Buffering and its types?
Functions of System Call (functions of a system call):
System calls have the following functions:
- It acts as an interface between the kernel and the processor.
- Service requests can be made to the operating system using system calls.
- There are some privilege instructions that are not followed by the user, then they are given by the operating system.
- trap, the operating system supervisor controls model switching and after performing some services, returns them to the user.
0 Comments