System Call
System Call
CreateProcess() Fork()
Process Control ExitProcess() Exit()
WaitForSingleObject() Wait()
Open()
CreateFile()
Read()
File manipulation ReadFile()
Write()
WriteFile()
Close()
SetConsoleMode() Ioctl()
Device Management ReadConsole() Read()
WriteConsole() Write()
GetCurrentProcessID() Getpid()
Information Maintenance SetTimer() Alarm()
Sleep() Sleep()
CreatePipe() Pipe()
Communication CreateFileMapping() Shmget()
MapViewOfFile() Mmap()
SetSecurityDescriptorgroup() Chown()
Open(): Accessing a file on a file system is possible with the open() system
call. It gives the file resources it needs and a handle the process can use. A
file can be opened by multiple processes simultaneously or just one process.
Everything is based on the structure and file system.
Read(): Data from a file on the file system is retrieved using it. In general, it
accepts three arguments:
A description of a file.
A buffer for read data storage.
How many bytes should be read from the file
Before reading, the file to be read could be identified by its file descriptor
and opened using the open() function.
Wait(): In some systems, a process might need to hold off until another
process has finished running before continuing. When a parent process
creates a child process, the execution of the parent process is halted until
the child process is complete. The parent process is stopped using the wait()
system call. The parent process regains control once the child process has
finished running.
Write(): Data from a user buffer is written using it to a device like a file. A
program can produce data in one way by using this system call. generally,
there are three arguments:
A description of a file.
A reference to the buffer where data is stored.
The amount of data that will be written from the buffer in bytes.
Fork(): The fork() system call is used by processes to create copies of
themselves. It is one of the methods used the most frequently in operating
systems to create processes. When a parent process creates a child
process, the parent process’s execution is suspended until the child process
is finished. The parent process regains control once the child process has
finished running.
Exit(): A system call called exit() is used to terminate a program. In
environments with multiple threads, this call indicates that the thread
execution is finished. After using the exit() system function, the operating
system recovers the resources used by the process.