0% found this document useful (0 votes)
7 views3 pages

Analyzing ps -aux Output Data

1. The ps command displays information about currently running processes. ps -e shows all processes and ps -a shows all processes including ones without controlling terminals. 2. The & symbol runs a process in the background. When a process runs in the background, it is assigned a PID number that is displayed. Nice is used to change a process' priority, with higher nice values indicating lower priority. Nice increases the priority by 10 units by default. 3. Sort is used to sort the contents of a file alphabetically or numerically. Fetch is used to retrieve files from remote systems using various protocols like FTP. Editors like vi and emacs are used to create and edit files. Quit without saving exits the editor without saving
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views3 pages

Analyzing ps -aux Output Data

1. The ps command displays information about currently running processes. ps -e shows all processes and ps -a shows all processes including ones without controlling terminals. 2. The & symbol runs a process in the background. When a process runs in the background, it is assigned a PID number that is displayed. Nice is used to change a process' priority, with higher nice values indicating lower priority. Nice increases the priority by 10 units by default. 3. Sort is used to sort the contents of a file alphabetically or numerically. Fetch is used to retrieve files from remote systems using various protocols like FTP. Editors like vi and emacs are used to create and edit files. Quit without saving exits the editor without saving
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

c 

  




 
  !"! 
!" " #$"


c %
Ans: A process can be defined as the instance of an executing program. Unix is multi-tasking operating system.
It means at any instant there might be several programs of several users running in memory. Though there
might be several processes running im memory at any given moment, the CPU can¶t cater to only one of these
processes as the other processes await their turn. There is a program called µscheduler¶ running in memory
which decides which process should get the CPU attention and when. At any given moment a process in
memory can be in one of the six states.
When you execute a program the scheduler submits your process to a queue called process queue. At this
instant the process is said to be in"&
state. Once submitted the process waits its turn in the queue for
some time. At this stage the process is said to be in #! state. As the process advances in the queue at some
instant it would become the next one in the queue to receive CPU attention. At this stage it is in! state.
Finally the process gets the attention of the CPU and starts getting executed and thereby attains the" state.
 !
"! 
!" " #$"

c 
2. What is the output of :
$ ps-e
$ ps-a commands
' ()

*+,++' 

%
( !

%
(



%
(-  !
.
%
(&!#" 
/01

( 
00

( 
)


*+,++' 
23
.
( 
.32
.
(

.&
( 
21
.&
(-

.
  !
"!   4 " ! 5 " !%
6
- $#
Ans: Ampersand (&) symbol is provided by the UNIX to run the process in the background. While executing the
command, if this symbol is placed at the end of the command then the command will be executed in the
background. When we run a process in the background a number is displayed on the screen. This is the PID of
the process that we have just executed in thye background.
As for example
$ sort [Link]>[Link] $
16894
$/ " - 7 !."

&5 " !*"8




  78
  !
"
&#
-
 $%
Ans: In the UNIX systems process are usually executed with equal priority. This is not always desirable since
high-priority jobs must be completed at the earliest. UNIX offera the
 command, which IS Used with the
operator to reduce the priority of jobs.
" 8
#8

7  !  "#!&
$!8


(

"$ "#9
Nice value range from 0 to 39, and commands run with a nice value of 20 in the Bourne shell, a higher nice
value meaning a lower prioritoy.
 reduces theb priority of any process by 10 units, raising its nice value to
30. The amount of reduction can also be specified with the: option:

: 8"$ "#9

  !
"! (
4   
#  $    !- !"#
  


' () :"  $ 






2
  !"! " ##8

 
-
!
(
m -
#

m   !


#

m - !;"

#

m <"
8
" -
=4!<"
>
' ((8
# 
(

.(8<
/(<?

You might also like