A system call is nothing but a call to an operating system to do some
thing behalf of user. In UNIX also
the system calls does the same. In UNIX
there are two modes.
User Mode: In user mode all the user level programs will be executed.
Kernel Mode: In kernel mode all the system level programs will be executed i.e.,whenever there is a need to access system
files. When the system starts by default the system is in kernel mode.
When the user logs in the
system he is in user mode. UNIX provides system calls to interact with operating
system files. When a system call was issued the control goes from user mode to
kernel mode and execution continues in kernel mode. After completed execution
in kernel mode the control transfers back to user mode.
Unix system calls can be categorized into
1) File related system calls
File related system calls are used to do operations
on a file like creating files reading files etc.
open(), read(), write(), lseek(), stat(),fstat(), chmod(),
chown() are some examples of file related system calls.
2) Directory related system calls
Directory related system calls are used to do
operations like creating a directory,getting present
working directory etc.
mkdir(), chdir(),rmdir() getcwd() are some examples of
directory related system calls.
3)Process related system calls
Process related calls are used to do operations on
processes like creating a new process, loading new process
code into executing process address space etc.
fork(),vfork(),exec(),wait(),getpid(),getppid() are some
examples of process related system calls.
4) Inter process communication
Inter process related system calls are used to
establish communication between two processes.
pipe(),msgget()msgsnd(),msgrcv(),semget(),semctl(),
shmget(),shmat() etc. are some examples of inter
process related system calls.
Directory handling system calls
Unix operating system Linux operating system shell programming bourn shell kourne shell c shell difference between unix and linux operating
system , history of UNIX, red hat operating system. UNIX OS architecture , kernel utility programs , file handling process handling inter process
communication pipes shared memory message queues socket programming TCP/IP , UDP programming , One to One chat Application , Basic shell program to add two
numbers , echo function , while loops clear gt lt le ge ne eq if fi while do done case array in unix strings , cut copy paste cat dir pwd getcwd chdir
command read write stat lseek fstat flock mechanism.even or add program vi editor command ni vi editor command mode esc mode insert mode aa dd x :q :wq :w
System calls. Pipes,mkdir,chdir,open read pipe,shmget,shmat ,msgctl,msgsnd msgrecv, system calls
No comments:
Post a Comment