System Call – It is the interface between the userspace program and kernel program to requests for resources.
Now why we need system calls-
- Reading and writing from files demand system calls.
- If a file system wants to create or delete files, system calls are required.
- System calls are used for the creation and management of new processes.
- Network connections need system calls for sending and receiving packets.
- Access to hardware devices like scanner, printer, need a system call.
Here are the five types of System Calls in OS:
- Process Control – This system call deals with process creation and termination, wait & signal events and allocate and free memory.
- File Management – This deals with the file manipulation like create, update, delete, read, write and add attributes to the file.
- Device Management – This deals with the device buffers like reading and writing as well as adding and removing logical devices.
- Information Maintenance – It handle the data transfer between user and OS kernel.
- Communications – This is used for inter process communication. Create and delete communication connections, send and receive messages etc.