Professional Documents
Culture Documents
System Call
System Call
System Call
Process Control
Definition: Process control system calls manage processes in the operating system. Processes
are instances of executing programs. These calls enable the creation, termination, and control
of processes.
• fork(): This system call creates a new process by duplicating the existing process.
• exec(): The exec() family of system calls replaces the current process with a new
process. It loads a new program into the current process's memory space.
• wait(): This system call suspends the execution of the calling process until one of its
child processes exits or terminates.
• exit(): It terminates the calling process and returns its resources to the system.
File Management
Definition: File management system calls handle files and directories in the operating system.
They perform operations such as creating, opening, closing, reading, and writing files
• seek(): Moves the file pointer associated with a file descriptor to a new position.
Device Management
Definition: Device management system calls interact with hardware devices attached to the
system. They provide an interface for accessing and controlling devices such as printers, disks,
and network interfaces.
• read() and write(): These are also used for device I/O operations.
• open() and close(): For opening and closing device files similar to regular files.
Information Maintenance
Definition: Information maintenance system calls provide mechanisms for obtaining and
manipulating system information, such as time, system configuration, and user account
details.
Communications
• msgget(), msgsnd(), msgrcv(): System calls for message queues, used for inter-process
communication.
• socket(), connect(), send(), recv(): System calls for inter-process communication over
networks using sockets.
Protection
Definition: Protection system calls enforce security policies and access controls to protect
system resources from unauthorized access.
• setuid(), setgid(): Temporarily changes the user or group ID of a process, typically used
for privilege escalation.
Each of these system calls plays a crucial role in managing the resources and operations of an
operating system, facilitating efficient execution of processes and management of files,
devices, and communication between processes while ensuring security and protection of
system resources.