Vous êtes sur la page 1sur 3

M.

imtiaz
B-18100
Assignment 1
PS command
The ps command on linux is one of the most basic commands for viewing the processes
running on the system. It provides a snapshot of the current processes along with detailed
information like user id, cpu usage, memory usage, command name etc. It does not display data
in real time like top or htop commands. But even though being simpler in features and output it
is still an essential process management/monitoring tool that every linux newbie should know
about and learn well.

Top command
This is the part of our on-going series of commands in Linux. We have covered basic ls
command and cat command. In this article, we are trying to explore top command
which is one of the most frequently used commands in our daily system administrative
jobs. top command displays processor activity of your Linux box and also displays tasks
managed by kernel in real-time. Itll show processor and memory are being used and
other information like running processes. This may help you to take correct
action. top command found in UNIX-like operating systems.

fg command
the fg command continues a stopped job by running it in the foreground.
The programs we've used so far ran instead of our current terminal. Usually we want to start a
program like emacs in addition to our command window, and to do this we use the special `&'
character.
[phasnip@mijpnb1 ~]$ emacs test.F90 &

Jobs command

Job control is nothing but the ability to stop/suspend the execution of processes (command) and
continue/resume their execution as per your requirements. This is done using your operating
system and shell such as bash/ksh or POSIX shell.You shell keeps a table of currently
executing jobs and can be displayed withjobs command.

grepcommand
The grep command is used to search text or searches the given file for lines containing
a match to the given strings or words. By default, grep displays the matching lines. Use
grep to search for lines of text that match one or many regular expressions, and outputs
only the matching lines. grep is considered as one of the most useful commands on
Linux and Unix-like operating systems.

System Call Execution


The system call handler gains control when a user program starts a system call. The system call
handler changes the protection domain from the caller protection domain, user, to the system call
protection domain, kernel, and switches to a protected stack.The system call handler then calls
the function supporting the system call. The loader maintains a table of the currently defined
system calls for this purpose.The system call runs within the calling process, but with more
privilege than the calling process. This is because the protection domain has changed
from user to kernel.The system call function returns to the system call handler when it has
performed its operation. The system call handler then restores the state of the process and returns
to the user program.There are two major protection domains in the operating system: the user
mode protection domain and the kernel mode protection domain.

Execlp System Call


The exec() family of functions replaces the current process image with a new process
image. The functions described in this manual page are front-ends for execve(2). (See
the manual page for execve(2) for further details about the replacement of the current
process image.)

Vous aimerez peut-être aussi