SlideShare a Scribd company logo
Process Management in Linux
Manikandan.C
9677718889
Senior Redhat Trainer
!!!Process!!! what it is ??
• A program is a series of instructions that tell the
computer what to do.
• When we run a program, those instructions are
copied into memory and space is allocated for
variables and other stuff required to manage its
execution.
• This running instance of a program is called a
process and it's processes which we manage.
For Example
create a file called user under /bin.
# vim /bin/user
useradd king
:wq
# chmod a+x /bin/user
Giving a command user an user named king will be created as a
result.
# user
 1st -> As soon as we open a terminal a process name bash
is started. . Rite ???? Tis systemd the parent process for
all descendant process is responsible.
 2nd -> users are creating process by command to execute
some program that is process.
Who is that
creating process
??
Description of process
• Like humans even process has the information like
when it is created,
• address space of allocated memory,
• security properties including ownership credentials
and privileges,
• one or more execution threads of program code, and
the process state.
NOTE: All processes are descendants of the first system process SYSTEMD.
Small briefing on -> fork, pthreads.
FORK:
Fork is nothing but an existing parent process
duplicates its own address space and create a
new child process structure.
Pthreads:(POSIX THREADS)
Parallel execution model which allows a
program to control multiple different flows of
work that overlap in time.
Mainly for the multitasking purpose
Linux Process states
A process (which includes a
thread) on a Linux machine can
be in any of the following states –
RUNNING
SLEEPING
STOPPED
ZOMBIE
Types of terminal
• Tty and pty:
 tty is called teletype where user interacts
with the system.
 Pty is called as the psuedoterminal where the
process uses as its terminal in the background.
And many would have came across the pts
terminal where pts is nothing but the slave
part of pty terminal.
RUNNING
• When a command triggers a program, the process
is automatically
Name Flag Kernel-defined state and description
Running R TASK_RUNNING - The process is either
executing on a CPU or waiting to be
executed.
Sleeping
Sleeping
S
TASK_INTERRUPTIBE: The
process is waiting for some
condition: a h/w request ,
system resource access or
signal. When an event or
signal satisfies the condition,
the process returns to
Running.
D TASK_UNINTERRUPTIBLE -
Like TASK_INTERRUPTIBLE,
except that delivering a
signal to the sleeping process
leaves its state unchanged.
K TASK_KILLABLE: identical to D
state, but modifies to allow
the waiting task to respond
to a signal to be killed.
STOPPED
Name Flag Description
Stopped
T TASK_STOPPED: The process has been
stopped, usually by being signaled by
a user or another process . The
process can be continued (resumed)
by another signal to return to
Running.
T TASK_TRACED: A process that is being
debugged is also temporarily Stopped
and shares the same T flag.
ZOMBIE
Name Flag Description
Zombie
Z EXIT_ZOMBIE - Process execution is
terminated, but the parent process
has not yet issued a wait4( ) or
waitpid( ) system call. The OS will
not clear zombie processes until
the parent issues a wait()-like call
X EXIT_DEAD: when the parent
cleans up (reaps) the remaining
child process structure, the process
is now released completely. This
state will never be observed in
process-listing utilities.
Process
Process
monitoring(top,sar,watch)
Managing process (ps)
Killing process(kill, pkill)
Setting priority(nice,renice)
Process commands usage
top
• Monitoring cpu
memory and
process
utilization
• Kill user and
system process
Kill
Priorities:
Nice
,renice >
Examples
> To display all the process:
# ps –ef
# ps ax
> To display process by user:
# ps –f -u apache,postfix
# ps –f -u linuxguy
> To show process by name or process Id:
#Ps -C apache2
# ps -f -p 2764
> To get the information on particular process:
# ps –ef | grep postfix
> To display threads of process:
# ps -p 2764 –L
> To know the parent id of the process:
# ps –ppid 2543
> To customize the view of process display:
Ps –eo pid,uname,pcpu,pmem,comm
> To list process in hierarchy:
# ps –ef - - forest
Thanks for watching

More Related Content

What's hot

Context switching
Context switchingContext switching
Context switching
DarakhshanNayyab
 
Lesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File SystemLesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File System
Sadia Bashir
 
Chapter 2 - Operating System Structures
Chapter 2 - Operating System StructuresChapter 2 - Operating System Structures
Chapter 2 - Operating System StructuresWayne Jones Jnr
 
Disk scheduling
Disk schedulingDisk scheduling
Disk scheduling
NEERAJ BAGHEL
 
linux file sysytem& input and output
linux file sysytem& input and outputlinux file sysytem& input and output
linux file sysytem& input and output
MythiliA5
 
Operating Systems: Process Scheduling
Operating Systems: Process SchedulingOperating Systems: Process Scheduling
Operating Systems: Process Scheduling
Damian T. Gordon
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process Concepts
Mukesh Chinta
 
Linux Memory Management
Linux Memory ManagementLinux Memory Management
Linux Memory Management
Suvendu Kumar Dash
 
Disk management
Disk managementDisk management
Disk management
Agnas Jasmine
 
Introduction to System Calls
Introduction to System CallsIntroduction to System Calls
Introduction to System Calls
Vandana Salve
 
Unix ppt
Unix pptUnix ppt
Unix ppt
sudhir saurav
 
Multithreading
MultithreadingMultithreading
Multithreading
A B Shinde
 
Architecture of operating system
Architecture of operating systemArchitecture of operating system
Architecture of operating system
Supriya Kumari
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
vampugani
 
UNIX Operating System
UNIX Operating SystemUNIX Operating System
UNIX Operating System
Fatima Qayyum
 
Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to Unix
Nishant Munjal
 
Single instruction multiple data
Single instruction multiple dataSingle instruction multiple data
Single instruction multiple data
Syed Zaid Irshad
 
Process in operating system
Process in operating systemProcess in operating system
Process in operating system
Chetan Mahawar
 

What's hot (20)

Context switching
Context switchingContext switching
Context switching
 
Lesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File SystemLesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File System
 
Chapter 2 - Operating System Structures
Chapter 2 - Operating System StructuresChapter 2 - Operating System Structures
Chapter 2 - Operating System Structures
 
Disk scheduling
Disk schedulingDisk scheduling
Disk scheduling
 
linux file sysytem& input and output
linux file sysytem& input and outputlinux file sysytem& input and output
linux file sysytem& input and output
 
Operating Systems: Process Scheduling
Operating Systems: Process SchedulingOperating Systems: Process Scheduling
Operating Systems: Process Scheduling
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process Concepts
 
Linux Memory Management
Linux Memory ManagementLinux Memory Management
Linux Memory Management
 
Linux Memory Management
Linux Memory ManagementLinux Memory Management
Linux Memory Management
 
Disk management
Disk managementDisk management
Disk management
 
Introduction to System Calls
Introduction to System CallsIntroduction to System Calls
Introduction to System Calls
 
operating system structure
operating system structureoperating system structure
operating system structure
 
Unix ppt
Unix pptUnix ppt
Unix ppt
 
Multithreading
MultithreadingMultithreading
Multithreading
 
Architecture of operating system
Architecture of operating systemArchitecture of operating system
Architecture of operating system
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
UNIX Operating System
UNIX Operating SystemUNIX Operating System
UNIX Operating System
 
Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to Unix
 
Single instruction multiple data
Single instruction multiple dataSingle instruction multiple data
Single instruction multiple data
 
Process in operating system
Process in operating systemProcess in operating system
Process in operating system
 

Similar to Process management in linux

LP-Unit3.docx
LP-Unit3.docxLP-Unit3.docx
LP-Unit3.docx
SeetharamNageshAppe1
 
Project of deamon process
Project of deamon processProject of deamon process
Project of deamon process
Abubakr Cheema
 
System Administration: Linux Process
System Administration: Linux ProcessSystem Administration: Linux Process
System Administration: Linux Process
lucita cabral
 
Managing Processes in Unix.pptx
Managing Processes in Unix.pptxManaging Processes in Unix.pptx
Managing Processes in Unix.pptx
Harsha Patel
 
Managing Processes in Unix.pptx
Managing Processes in Unix.pptxManaging Processes in Unix.pptx
Managing Processes in Unix.pptx
Harsha Patel
 
Week 11Linux InternalsProcesses, schedulingLecture o.docx
Week 11Linux InternalsProcesses, schedulingLecture o.docxWeek 11Linux InternalsProcesses, schedulingLecture o.docx
Week 11Linux InternalsProcesses, schedulingLecture o.docx
melbruce90096
 
Advanced Operating Systems......Process Management
Advanced Operating Systems......Process ManagementAdvanced Operating Systems......Process Management
Advanced Operating Systems......Process Management
Veejeya Kumbhar
 
UNIT-2-Process-Management.pdf
UNIT-2-Process-Management.pdfUNIT-2-Process-Management.pdf
UNIT-2-Process-Management.pdf
aakritii765
 
UNIX Notes
UNIX NotesUNIX Notes
UNIX Notes
PandurangBiradar2
 
Linux Programming
Linux ProgrammingLinux Programming
Linux Server Deep Dives (DrupalCon Amsterdam)
Linux Server Deep Dives (DrupalCon Amsterdam)Linux Server Deep Dives (DrupalCon Amsterdam)
Linux Server Deep Dives (DrupalCon Amsterdam)
Amin Astaneh
 
Linux Internals - Part II
Linux Internals - Part IILinux Internals - Part II
Linux Internals - Part II
Emertxe Information Technologies Pvt Ltd
 
An Introduction To Linux
An Introduction To LinuxAn Introduction To Linux
An Introduction To Linux
Ishan A B Ambanwela
 
Unix Shell and System Boot Process
Unix Shell and System Boot ProcessUnix Shell and System Boot Process
Unix Shell and System Boot Process
Arvind Krishnaa
 
Tarea - 3 Actividad intermedia trabajo colaborativo 2
Tarea - 3 Actividad intermedia trabajo colaborativo 2Tarea - 3 Actividad intermedia trabajo colaborativo 2
Tarea - 3 Actividad intermedia trabajo colaborativo 2
HectorFabianPintoOsp
 
Linux Systems Programming: Process CommunCh11 Processes and Signals
Linux Systems Programming: Process CommunCh11 Processes and SignalsLinux Systems Programming: Process CommunCh11 Processes and Signals
Linux Systems Programming: Process CommunCh11 Processes and Signals
RashidFaridChishti
 
Daemons
DaemonsDaemons
Daemons
christina555
 
3.5 create, monitor and kill processes v2
3.5 create, monitor and kill processes v23.5 create, monitor and kill processes v2
3.5 create, monitor and kill processes v2
Acácio Oliveira
 
Operating System 3
Operating System 3Operating System 3
Operating System 3tech2click
 
Lecture_Slide_4.pptx
Lecture_Slide_4.pptxLecture_Slide_4.pptx
Lecture_Slide_4.pptx
DiptoRoy21
 

Similar to Process management in linux (20)

LP-Unit3.docx
LP-Unit3.docxLP-Unit3.docx
LP-Unit3.docx
 
Project of deamon process
Project of deamon processProject of deamon process
Project of deamon process
 
System Administration: Linux Process
System Administration: Linux ProcessSystem Administration: Linux Process
System Administration: Linux Process
 
Managing Processes in Unix.pptx
Managing Processes in Unix.pptxManaging Processes in Unix.pptx
Managing Processes in Unix.pptx
 
Managing Processes in Unix.pptx
Managing Processes in Unix.pptxManaging Processes in Unix.pptx
Managing Processes in Unix.pptx
 
Week 11Linux InternalsProcesses, schedulingLecture o.docx
Week 11Linux InternalsProcesses, schedulingLecture o.docxWeek 11Linux InternalsProcesses, schedulingLecture o.docx
Week 11Linux InternalsProcesses, schedulingLecture o.docx
 
Advanced Operating Systems......Process Management
Advanced Operating Systems......Process ManagementAdvanced Operating Systems......Process Management
Advanced Operating Systems......Process Management
 
UNIT-2-Process-Management.pdf
UNIT-2-Process-Management.pdfUNIT-2-Process-Management.pdf
UNIT-2-Process-Management.pdf
 
UNIX Notes
UNIX NotesUNIX Notes
UNIX Notes
 
Linux Programming
Linux ProgrammingLinux Programming
Linux Programming
 
Linux Server Deep Dives (DrupalCon Amsterdam)
Linux Server Deep Dives (DrupalCon Amsterdam)Linux Server Deep Dives (DrupalCon Amsterdam)
Linux Server Deep Dives (DrupalCon Amsterdam)
 
Linux Internals - Part II
Linux Internals - Part IILinux Internals - Part II
Linux Internals - Part II
 
An Introduction To Linux
An Introduction To LinuxAn Introduction To Linux
An Introduction To Linux
 
Unix Shell and System Boot Process
Unix Shell and System Boot ProcessUnix Shell and System Boot Process
Unix Shell and System Boot Process
 
Tarea - 3 Actividad intermedia trabajo colaborativo 2
Tarea - 3 Actividad intermedia trabajo colaborativo 2Tarea - 3 Actividad intermedia trabajo colaborativo 2
Tarea - 3 Actividad intermedia trabajo colaborativo 2
 
Linux Systems Programming: Process CommunCh11 Processes and Signals
Linux Systems Programming: Process CommunCh11 Processes and SignalsLinux Systems Programming: Process CommunCh11 Processes and Signals
Linux Systems Programming: Process CommunCh11 Processes and Signals
 
Daemons
DaemonsDaemons
Daemons
 
3.5 create, monitor and kill processes v2
3.5 create, monitor and kill processes v23.5 create, monitor and kill processes v2
3.5 create, monitor and kill processes v2
 
Operating System 3
Operating System 3Operating System 3
Operating System 3
 
Lecture_Slide_4.pptx
Lecture_Slide_4.pptxLecture_Slide_4.pptx
Lecture_Slide_4.pptx
 

More from Mazenetsolution

Tally Auto E-mail Module | Mazenet Technologies
Tally Auto E-mail Module | Mazenet TechnologiesTally Auto E-mail Module | Mazenet Technologies
Tally Auto E-mail Module | Mazenet Technologies
Mazenetsolution
 
Tally Auto SMS Module| Mazenet Technologies
Tally Auto SMS  Module| Mazenet TechnologiesTally Auto SMS  Module| Mazenet Technologies
Tally Auto SMS Module| Mazenet Technologies
Mazenetsolution
 
Tally auto synchronization
Tally auto synchronization Tally auto synchronization
Tally auto synchronization
Mazenetsolution
 
Print barcode using voucher- Mazenettechnologies
Print barcode using voucher- MazenettechnologiesPrint barcode using voucher- Mazenettechnologies
Print barcode using voucher- Mazenettechnologies
Mazenetsolution
 
Copy user list | Tally | Tally Software | Accounting Software | Mazenet
Copy user list | Tally | Tally Software | Accounting Software | MazenetCopy user list | Tally | Tally Software | Accounting Software | Mazenet
Copy user list | Tally | Tally Software | Accounting Software | Mazenet
Mazenetsolution
 
Auto synchronization | Tally Software | Mazenet Technologies
Auto synchronization | Tally Software | Mazenet TechnologiesAuto synchronization | Tally Software | Mazenet Technologies
Auto synchronization | Tally Software | Mazenet Technologies
Mazenetsolution
 
Auto backup | Tally Coimbatore | Tally Software
Auto backup | Tally Coimbatore | Tally SoftwareAuto backup | Tally Coimbatore | Tally Software
Auto backup | Tally Coimbatore | Tally Software
Mazenetsolution
 
Mazenet Technologies-Tally
Mazenet Technologies-TallyMazenet Technologies-Tally
Mazenet Technologies-Tally
Mazenetsolution
 
Android - Intents - Mazenet Solution
Android - Intents - Mazenet SolutionAndroid - Intents - Mazenet Solution
Android - Intents - Mazenet Solution
Mazenetsolution
 
Java - Servlet - Mazenet Solution
Java - Servlet - Mazenet SolutionJava - Servlet - Mazenet Solution
Java - Servlet - Mazenet Solution
Mazenetsolution
 
Software Testing - Tool support for testing (CAST) - Mazenet Solution
Software Testing - Tool support for testing (CAST) - Mazenet SolutionSoftware Testing - Tool support for testing (CAST) - Mazenet Solution
Software Testing - Tool support for testing (CAST) - Mazenet Solution
Mazenetsolution
 
Software Testing - Test management - Mazenet Solution
Software Testing - Test management - Mazenet SolutionSoftware Testing - Test management - Mazenet Solution
Software Testing - Test management - Mazenet Solution
Mazenetsolution
 
Red Hat - LVM - Mazenet Solution
Red Hat - LVM - Mazenet SolutionRed Hat - LVM - Mazenet Solution
Red Hat - LVM - Mazenet Solution
Mazenetsolution
 
PHP - Introduction to PHP - Mazenet Solution
PHP - Introduction to PHP - Mazenet SolutionPHP - Introduction to PHP - Mazenet Solution
PHP - Introduction to PHP - Mazenet Solution
Mazenetsolution
 
Static testing techniques
Static testing techniquesStatic testing techniques
Static testing techniques
Mazenetsolution
 
Java- GUI- Mazenet solution
Java- GUI- Mazenet solutionJava- GUI- Mazenet solution
Java- GUI- Mazenet solution
Mazenetsolution
 
Oracle- Introduction to Sql commands- Mazenet solution
Oracle- Introduction to Sql commands- Mazenet solutionOracle- Introduction to Sql commands- Mazenet solution
Oracle- Introduction to Sql commands- Mazenet solution
Mazenetsolution
 
Software Testing- Principles of testing- Mazenet Solution
Software Testing- Principles of testing- Mazenet SolutionSoftware Testing- Principles of testing- Mazenet Solution
Software Testing- Principles of testing- Mazenet Solution
Mazenetsolution
 
Java- JDBC- Mazenet Solution
Java- JDBC- Mazenet SolutionJava- JDBC- Mazenet Solution
Java- JDBC- Mazenet Solution
Mazenetsolution
 
Software Testing-Dynamic testing technique-Mazenet solution
Software Testing-Dynamic testing technique-Mazenet solutionSoftware Testing-Dynamic testing technique-Mazenet solution
Software Testing-Dynamic testing technique-Mazenet solution
Mazenetsolution
 

More from Mazenetsolution (20)

Tally Auto E-mail Module | Mazenet Technologies
Tally Auto E-mail Module | Mazenet TechnologiesTally Auto E-mail Module | Mazenet Technologies
Tally Auto E-mail Module | Mazenet Technologies
 
Tally Auto SMS Module| Mazenet Technologies
Tally Auto SMS  Module| Mazenet TechnologiesTally Auto SMS  Module| Mazenet Technologies
Tally Auto SMS Module| Mazenet Technologies
 
Tally auto synchronization
Tally auto synchronization Tally auto synchronization
Tally auto synchronization
 
Print barcode using voucher- Mazenettechnologies
Print barcode using voucher- MazenettechnologiesPrint barcode using voucher- Mazenettechnologies
Print barcode using voucher- Mazenettechnologies
 
Copy user list | Tally | Tally Software | Accounting Software | Mazenet
Copy user list | Tally | Tally Software | Accounting Software | MazenetCopy user list | Tally | Tally Software | Accounting Software | Mazenet
Copy user list | Tally | Tally Software | Accounting Software | Mazenet
 
Auto synchronization | Tally Software | Mazenet Technologies
Auto synchronization | Tally Software | Mazenet TechnologiesAuto synchronization | Tally Software | Mazenet Technologies
Auto synchronization | Tally Software | Mazenet Technologies
 
Auto backup | Tally Coimbatore | Tally Software
Auto backup | Tally Coimbatore | Tally SoftwareAuto backup | Tally Coimbatore | Tally Software
Auto backup | Tally Coimbatore | Tally Software
 
Mazenet Technologies-Tally
Mazenet Technologies-TallyMazenet Technologies-Tally
Mazenet Technologies-Tally
 
Android - Intents - Mazenet Solution
Android - Intents - Mazenet SolutionAndroid - Intents - Mazenet Solution
Android - Intents - Mazenet Solution
 
Java - Servlet - Mazenet Solution
Java - Servlet - Mazenet SolutionJava - Servlet - Mazenet Solution
Java - Servlet - Mazenet Solution
 
Software Testing - Tool support for testing (CAST) - Mazenet Solution
Software Testing - Tool support for testing (CAST) - Mazenet SolutionSoftware Testing - Tool support for testing (CAST) - Mazenet Solution
Software Testing - Tool support for testing (CAST) - Mazenet Solution
 
Software Testing - Test management - Mazenet Solution
Software Testing - Test management - Mazenet SolutionSoftware Testing - Test management - Mazenet Solution
Software Testing - Test management - Mazenet Solution
 
Red Hat - LVM - Mazenet Solution
Red Hat - LVM - Mazenet SolutionRed Hat - LVM - Mazenet Solution
Red Hat - LVM - Mazenet Solution
 
PHP - Introduction to PHP - Mazenet Solution
PHP - Introduction to PHP - Mazenet SolutionPHP - Introduction to PHP - Mazenet Solution
PHP - Introduction to PHP - Mazenet Solution
 
Static testing techniques
Static testing techniquesStatic testing techniques
Static testing techniques
 
Java- GUI- Mazenet solution
Java- GUI- Mazenet solutionJava- GUI- Mazenet solution
Java- GUI- Mazenet solution
 
Oracle- Introduction to Sql commands- Mazenet solution
Oracle- Introduction to Sql commands- Mazenet solutionOracle- Introduction to Sql commands- Mazenet solution
Oracle- Introduction to Sql commands- Mazenet solution
 
Software Testing- Principles of testing- Mazenet Solution
Software Testing- Principles of testing- Mazenet SolutionSoftware Testing- Principles of testing- Mazenet Solution
Software Testing- Principles of testing- Mazenet Solution
 
Java- JDBC- Mazenet Solution
Java- JDBC- Mazenet SolutionJava- JDBC- Mazenet Solution
Java- JDBC- Mazenet Solution
 
Software Testing-Dynamic testing technique-Mazenet solution
Software Testing-Dynamic testing technique-Mazenet solutionSoftware Testing-Dynamic testing technique-Mazenet solution
Software Testing-Dynamic testing technique-Mazenet solution
 

Recently uploaded

Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 

Recently uploaded (20)

Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 

Process management in linux

  • 1. Process Management in Linux Manikandan.C 9677718889 Senior Redhat Trainer
  • 2. !!!Process!!! what it is ?? • A program is a series of instructions that tell the computer what to do. • When we run a program, those instructions are copied into memory and space is allocated for variables and other stuff required to manage its execution. • This running instance of a program is called a process and it's processes which we manage.
  • 3. For Example create a file called user under /bin. # vim /bin/user useradd king :wq # chmod a+x /bin/user Giving a command user an user named king will be created as a result. # user
  • 4.  1st -> As soon as we open a terminal a process name bash is started. . Rite ???? Tis systemd the parent process for all descendant process is responsible.  2nd -> users are creating process by command to execute some program that is process. Who is that creating process ??
  • 5. Description of process • Like humans even process has the information like when it is created, • address space of allocated memory, • security properties including ownership credentials and privileges, • one or more execution threads of program code, and the process state. NOTE: All processes are descendants of the first system process SYSTEMD.
  • 6. Small briefing on -> fork, pthreads. FORK: Fork is nothing but an existing parent process duplicates its own address space and create a new child process structure. Pthreads:(POSIX THREADS) Parallel execution model which allows a program to control multiple different flows of work that overlap in time. Mainly for the multitasking purpose
  • 7. Linux Process states A process (which includes a thread) on a Linux machine can be in any of the following states – RUNNING SLEEPING STOPPED ZOMBIE
  • 8. Types of terminal • Tty and pty:  tty is called teletype where user interacts with the system.  Pty is called as the psuedoterminal where the process uses as its terminal in the background. And many would have came across the pts terminal where pts is nothing but the slave part of pty terminal.
  • 9. RUNNING • When a command triggers a program, the process is automatically Name Flag Kernel-defined state and description Running R TASK_RUNNING - The process is either executing on a CPU or waiting to be executed.
  • 10. Sleeping Sleeping S TASK_INTERRUPTIBE: The process is waiting for some condition: a h/w request , system resource access or signal. When an event or signal satisfies the condition, the process returns to Running. D TASK_UNINTERRUPTIBLE - Like TASK_INTERRUPTIBLE, except that delivering a signal to the sleeping process leaves its state unchanged. K TASK_KILLABLE: identical to D state, but modifies to allow the waiting task to respond to a signal to be killed.
  • 11. STOPPED Name Flag Description Stopped T TASK_STOPPED: The process has been stopped, usually by being signaled by a user or another process . The process can be continued (resumed) by another signal to return to Running. T TASK_TRACED: A process that is being debugged is also temporarily Stopped and shares the same T flag.
  • 12. ZOMBIE Name Flag Description Zombie Z EXIT_ZOMBIE - Process execution is terminated, but the parent process has not yet issued a wait4( ) or waitpid( ) system call. The OS will not clear zombie processes until the parent issues a wait()-like call X EXIT_DEAD: when the parent cleans up (reaps) the remaining child process structure, the process is now released completely. This state will never be observed in process-listing utilities.
  • 13. Process Process monitoring(top,sar,watch) Managing process (ps) Killing process(kill, pkill) Setting priority(nice,renice)
  • 14. Process commands usage top • Monitoring cpu memory and process utilization • Kill user and system process Kill Priorities: Nice ,renice >
  • 15. Examples > To display all the process: # ps –ef # ps ax > To display process by user: # ps –f -u apache,postfix # ps –f -u linuxguy
  • 16. > To show process by name or process Id: #Ps -C apache2 # ps -f -p 2764 > To get the information on particular process: # ps –ef | grep postfix
  • 17. > To display threads of process: # ps -p 2764 –L > To know the parent id of the process: # ps –ppid 2543 > To customize the view of process display: Ps –eo pid,uname,pcpu,pmem,comm > To list process in hierarchy: # ps –ef - - forest