0% found this document useful (0 votes)
112 views2 pages

System Calls in Unix and Windows

System calls provide an interface between processes and the operating system. Unix system calls are used for file system control, process control, and interprocess communication. There are around 80 Unix system calls, including access(), chdir(), chmod(), chown(), kill(), link(), open(), pause(), stime(), times(), alarm(), fork(), and chroot(). Windows system calls also control file systems, processes, communication, memory, and I/O. Important Windows calls include CreateProcess(), ExitProcess(), CreateFile(), ReadFile(), WriteFile(), CloseHandle(), SetTimer(), CreatePipe(), SetFileSecurity(), SetConsoleMode(), ReadConsole(), and WriteConsole().

Uploaded by

Sameer A.A
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
112 views2 pages

System Calls in Unix and Windows

System calls provide an interface between processes and the operating system. Unix system calls are used for file system control, process control, and interprocess communication. There are around 80 Unix system calls, including access(), chdir(), chmod(), chown(), kill(), link(), open(), pause(), stime(), times(), alarm(), fork(), and chroot(). Windows system calls also control file systems, processes, communication, memory, and I/O. Important Windows calls include CreateProcess(), ExitProcess(), CreateFile(), ReadFile(), WriteFile(), CloseHandle(), SetTimer(), CreatePipe(), SetFileSecurity(), SetConsoleMode(), ReadConsole(), and WriteConsole().

Uploaded by

Sameer A.A
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

System Calls in Unix and Windows

The interface between a process and an operating system is provided by system calls. In general,
system calls are available as assembly language instructions. They are also included in the manuals
used by the assembly level programmers.

Unix System Calls


System calls in Unix are used for file system control, process control, interprocess communication
etc. Access to the Unix kernel is only available through these system calls. Generally, system calls
are similar to function calls, the only difference is that they remove the control from the user
process.

There are around 80 system calls in the Unix interface currently. Details about some of the important
ones are given as follows -

System Call Description


access() This checks if a calling process has access to the required file
chdir() The chdir command changes the current directory of the system
chmod() The mode of a file can be changed using this command
chown() This changes the ownership of a particular file
kill() This system call sends kill signal to one or more processes
link() A new file name is linked to an existing file using link system call.
open() This opens a file for the reading or writing process
pause() The pause call suspends a file until a particular signal occurs.
stime() This system call sets the correct time.
times() Gets the parent and child process times
alarm() The alarm system call sets the alarm clock of a process
fork() A new process is created using this command
chroot() This changes the root directory of a file.
exit() The exit system call is used to exit a process.

Windows System Calls


System calls in Windows are used for file system control, process control, interprocess
communication, main memory management, I/O device handling, security etc. The programs
interact with the Windows operating system using the system calls. Since system calls are the only
way to access the kernel, all the programs requiring resources must use system calls.
Details about some of the important system calls in Windows are given as follows -

System Call Description


CreateProcess() A new process is created using this command
ExitProcess() This system call is used to exit a process.
CreateFile() A file is created or opened using this system call.
ReadFile() Data is read from the file using this system call.
WriteFile() Data is written into the file using this system call.
CloseHandle() This system call closes the file currently in use.
SetTimer() This system call sets the alarm or the timer of a process
CreatePipe() A pipe is created using this system call
SetFileSecurity() This system call sets the security for a particular process
SetConsoleMode() This sets the input mode or output mode of the console’s

 input buffer or output screen buffer respectively.


ReadConsole() This reads the characters from the console input buffer.
WriteConsole() This writes the characters into the console output buffer.

You might also like