Hello
friends, in this blog I am going to write some information regrading
process management in Unix like operating system(Ubuntu). Unix like
operating system uses different file system compares to windows
operating system. There are various process are running currently in
operating system as shown in figure 1. this can be seen by using
shell command “top”. Following figure 1 shows result of top
command.
fig1. result of top command |
Process:
Firstly
we have to understand what is process, “process is a programm is
currently in running”. At the time of process running process may
go from various states are as: new born, runnable, running ,waiting,
halt etc.
In
Unix like operating system process are created by using system call
like sys_fork() . Whenever a process is created in Ubuntu(Unix like)
operating system firstly create process directory by there process id
(pid) or by process name in file system. We can also check which are
the process are currently running in the directory: /proc$
Now
we are going to check that all running process are really going to
create directory in “/procc$”. Look at figure 2 result of top
command shows process running currently and also look at figure 3
shows contents of /proc$ directory.we can check the process in this
directory by using command “ls”. Result of ls command is shown in
figure 3.
fig2.result of top command |
In
this figure 2 look at the highlighted text shows process that is pid of
process is 1575 created by user ravikumar, now look at figure 3 shows
directory created by process id 1575 is highlighted.
fig3. contents of /proc$ |
Now
the question arises that what is contained in this directory “1575”
? this directory contains details of process such as memory used by
process, list of opened files by processes, cpu status, environmental
variables, scheduling information, io devices used by process etc.
One
more point i have to discuss regurding processes is “how much of
the process can be created in unix like operating system can you
guess”. OK don’t worry I will tell that maximum process process that
are allowed to create are 32767. this is not complete discussion
about process management.
After switching to /proc$ directory, we have to execute command "ls -aux", right. Okay, so my question is in /proc$ directory either we get process name or it's ID. so how i can see that the given process id is of which process?
ReplyDeleteyes we get directory for each process named by process id(pid).
Delete