Normal programs can’t do everything. Many operations such as calling other programs, dealing with files, and exiting have to be handled by the operating system through system calls.
All system calls return -1 on failure
Processes conventionally have access to three files: standard input file(0), standard output file(1), standard error file(2)
open()
O_RDONLY
creat()
read()
write()
mknod()
execution environment
current directory
exit()
to create new processes
fork()
execl()
terminate processes
synchronize stages of process execution
wait()
pipe
control reaction to various events