In computing, a system call is the programmatic way in which a computer program requests a service from the kernel of the operating system it is executed on. A system call is a way for programs to interact with the operating system. A computer program makes a system call when it makes a request to the operating system’s kernel. System call provides the services of the operating system to the user programs via Application Program Interface(API). It provides an interface between a process and operating system to allow user-level processes to request services of the operating system. System calls are the only entry points into the kernel system. All programs needing resources must use system calls.
Services Provided by System Calls :
- Process creation and management
- Main memory management
- File Access, Directory and File system management
- Device handling(I/O)
- Protection
- Networking, etc.
- Process control: end, abort, create, terminate, allocate and free memory.
- File management: create, open, close, delete, read file etc.
- Device management
- Information maintenance
- Communication
- Xv6 Operating System -adding a new system call
- Remote Procedure Call (RPC) in Operating System
- What happens when we call a Function
- System Protection in Operating System
- Allocating kernel memory (buddy system and slab system)
- User View Vs Hardware View Vs System View of Operating System
- System Programs in Operating System
- Difference between Local File System (LFS) and Distributed File System (DFS)
- File System Implementation in Operating System
- Traps and System Calls in Operating System (OS)
- Difference between Batch Processing System and Online Processing System
- Introduction of Deadlock in Operating System
- Introduction of Operating System - Set 1
- Introduction of Basic Input Output System (BIOS)
- Thread in Operating System
- Paging in Operating System
- Banker's Algorithm in Operating System
- Segmentation in Operating System
- File Systems in Operating System
- Virtual Memory in Operating System
Types of System Calls : There are 5 different categories of system calls –
Examples of Windows and Unix System Calls –
| Windows | Unix | |
|---|---|---|
| Process Control | CreateProcess() ExitProcess() WaitForSingleObject() |
fork() exit() wait() |
|
File Manipulation |
CreateFile() ReadFile() WriteFile() CloseHandle() |
open() read() write() close() |
| Device Manipulation | SetConsoleMode() ReadConsole() WriteConsole() |
ioctl() read() write() |
| Information Maintenance | GetCurrentProcessID() SetTimer() Sleep() |
getpid() alarm() sleep() |
| Communication | CreatePipe() CreateFileMapping() MapViewOfFile() |
pipe() shmget() mmap() |
| Protection | SetFileSecurity() InitlializeSecurityDescriptor() SetSecurityDescriptorGroup() |
chmod() umask() chown() |
Reference –http://www.cs.columbia.edu/~jae/4118/L02-intro2-osc-ch2.pdf
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
Recommended Posts:
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : manjit

