Operating System

Describe system call and its type ?

Types of System call

Process Control

Process control is the system call that is used to direct the processes. Some process control examples include creating, load, abort, end, execute, process, terminate the process, etc.

  • fork(): Create a new process.
  • exec(): Replace the current process with a new program.
  • exit(): Terminate the current process.
  • wait(): Wait for a child process to terminate.

File Management

File management is a system call that is used to handle the files. Some file management examples include creating files, delete files, open, close, read, write, etc.

  • open(): Open a file.
  • read(): Read data from a file.
  • write(): Write data to a file.
  • close(): Close a file descriptor

Device Management

Device management is a system call that is used to deal with devices. Some examples of device management include read, device, write, get device attributes, release device, etc.

  • ioctl(): Perform I/O control operations on devices.
  • read(), write(): Used for device I/O operations as well.

Information Maintenance

Information maintenance is a system call that is used to maintain information. There are some examples of information maintenance, including getting system data, set time or date, get time or date, set system data, etc.

  • getpid(): Get the process ID of the current process.
  • getuid(): Get the user ID of the current process.
  • gettimeofday(): Get the current system time.

Communication

Communication is a system call that is used for communication. There are some examples of communication, including create, delete communication connections, send, receive messages, etc.

  • socket(): Create a new communication endpoint (socket).
  • connect(): Initiate a connection on a socket.
  • send(), recv(): Send and receive data over a socket.
  • bind(), listen(), accept(): Operations related to networking and inter-process

Leave a Reply

Your email address will not be published. Required fields are marked *