Device Management
The device management system calls are used to interact with various peripherial devices attached to the PC or even the management of the current device.
- SetConsoleMode(): This call is made to set the mode of console (input or output). It allows a process to control various console modes. In windows, it is used to control the behaviour of command line.
- WriteConsole(): It allows us to write data on console screen.
- ReadConsole(): It allows us to read data from console screen (if any arguments are provided).
- open(): This call is made whenever a device or a file is opened. A unique file descriptor is created to maintain the control access to the opened file or device.
- close(): This call is made when the system or the user closes the file or device.
Different Types of System Calls in OS
System calls are interfaces provisioned by the operating system to allow user-level applications to interact with low-level hardware components & make use of all the services provided by the kernel, which is a core component and the heart of an operating system that manages all the hardware and the services provided by the OS. These system calls are essential for every process to interact with the kernel and leverage the services provided by it.
System calls are basically an interface between a process and the operating system. And they’re the only way to switch from user mode to kernel mode.
Pre-requisite: Introduction to System Calls