SlideShare a Scribd company logo
1 of 11
Operations on
Processes
BY NAVID DANESHVARAN
SOFTWARE ENGINEERING STUDENT AT KHARAZMI
UNIVERSITY
2 /
11Process Creation
 Parent Process
 Children Process
 Process identifier (pid)
 Pid
Tree of Processes
UNIX, Linux & Windows
Index to access process within the kernel
3 /
11Process Tree for the Linux OS
UNIX and Linux ps -el
4 /
11Parent and Child Process
 Parent Process
 Directly from OS
 Constrained to a Subset of the Resources of the Parent Process
 Purpose: Prevent Overloading the System
Child Process Needs CPU Time, Memory, Files,
I/O Devices
Partition or Share Some Resources
5 /
11Parent and Child Process
 Parent Process
 Create New Process
 1- Parent Continues to Execute
 2- Parent Waits
 Address-Space Possibilities
 1- Duplicate of the Parent Process
 2- New Program Loaded
Child Processinitialization data (input)
6 /
11Creating Process in UNIX
7 /
11Process Creation in Windows
8 /
11Process Termination
 Finishes Executing Its Final Statement
 Delete it by exit() System Call
 Status Value (Typically int) Its Parent
 TerminateProcess() in Windows Parent of the Process
 Reasons: 1- child has exceeded its usage 2- task assigned to the child is no
longer required 3- parent terminates
9 /
11Process Termination
 cascading termination
 Zombie Process
UNIX & Linux
10 /
11Thank You for Your Attention
Any Question?
11 /
11Resources
 A. Silberschatz, Operating System Concepts, 2012.

More Related Content

What's hot

What's hot (20)

Chapter 2: Operating System Structures
Chapter 2: Operating System StructuresChapter 2: Operating System Structures
Chapter 2: Operating System Structures
 
Linux file system
Linux file systemLinux file system
Linux file system
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
CPU Scheduling in OS Presentation
CPU Scheduling in OS  PresentationCPU Scheduling in OS  Presentation
CPU Scheduling in OS Presentation
 
CS6401 OPERATING SYSTEMS Unit 2
CS6401 OPERATING SYSTEMS Unit 2CS6401 OPERATING SYSTEMS Unit 2
CS6401 OPERATING SYSTEMS Unit 2
 
CPU scheduling
CPU schedulingCPU scheduling
CPU scheduling
 
Mass Storage Structure
Mass Storage StructureMass Storage Structure
Mass Storage Structure
 
process creation OS
process creation OSprocess creation OS
process creation OS
 
Disk scheduling algorithms
Disk scheduling algorithms Disk scheduling algorithms
Disk scheduling algorithms
 
Input output hardware of operating system
Input output hardware of operating systemInput output hardware of operating system
Input output hardware of operating system
 
Paging.ppt
Paging.pptPaging.ppt
Paging.ppt
 
System calls
System callsSystem calls
System calls
 
Memory management ppt
Memory management pptMemory management ppt
Memory management ppt
 
Process threads operating system.
Process threads operating system.Process threads operating system.
Process threads operating system.
 
File Management in Operating System
File Management in Operating SystemFile Management in Operating System
File Management in Operating System
 
System call
System callSystem call
System call
 
Kernel. Operating System
Kernel. Operating SystemKernel. Operating System
Kernel. Operating System
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process Concepts
 
Process management
Process managementProcess management
Process management
 
Kernel (OS)
Kernel (OS)Kernel (OS)
Kernel (OS)
 

Similar to Operations on Processes

Ch2_Processes_and_process_management_1.ppt
Ch2_Processes_and_process_management_1.pptCh2_Processes_and_process_management_1.ppt
Ch2_Processes_and_process_management_1.ppt
Mohammad Almuiet
 
Understanding operating systems 5th ed ch13
Understanding operating systems 5th ed ch13Understanding operating systems 5th ed ch13
Understanding operating systems 5th ed ch13
BarrBoy
 

Similar to Operations on Processes (20)

CH03.pdf
CH03.pdfCH03.pdf
CH03.pdf
 
Lecture_Slide_4.pptx
Lecture_Slide_4.pptxLecture_Slide_4.pptx
Lecture_Slide_4.pptx
 
Lecture_3-Process Management.pdf
Lecture_3-Process Management.pdfLecture_3-Process Management.pdf
Lecture_3-Process Management.pdf
 
9 cm402.13
9 cm402.139 cm402.13
9 cm402.13
 
What is-a-computer-process-os
What is-a-computer-process-osWhat is-a-computer-process-os
What is-a-computer-process-os
 
Cs8493 unit 2
Cs8493 unit 2Cs8493 unit 2
Cs8493 unit 2
 
Processes
ProcessesProcesses
Processes
 
Lect3 process
Lect3 processLect3 process
Lect3 process
 
System calls operating system ppt by rohit malav
System calls operating system  ppt by rohit malavSystem calls operating system  ppt by rohit malav
System calls operating system ppt by rohit malav
 
Ch2_Processes_and_process_management_1.ppt
Ch2_Processes_and_process_management_1.pptCh2_Processes_and_process_management_1.ppt
Ch2_Processes_and_process_management_1.ppt
 
Windows Live Forensics 101
Windows Live Forensics 101Windows Live Forensics 101
Windows Live Forensics 101
 
Advanced Operating Systems......Process Management
Advanced Operating Systems......Process ManagementAdvanced Operating Systems......Process Management
Advanced Operating Systems......Process Management
 
Lecture 8 9 process_concept
Lecture 8 9 process_conceptLecture 8 9 process_concept
Lecture 8 9 process_concept
 
Processes in Linux.ppt
Processes in Linux.pptProcesses in Linux.ppt
Processes in Linux.ppt
 
11_UNIX_Processes_Including_Select.ppt
11_UNIX_Processes_Including_Select.ppt11_UNIX_Processes_Including_Select.ppt
11_UNIX_Processes_Including_Select.ppt
 
Process management
Process managementProcess management
Process management
 
Understanding operating systems 5th ed ch13
Understanding operating systems 5th ed ch13Understanding operating systems 5th ed ch13
Understanding operating systems 5th ed ch13
 
ch3.ppt
ch3.pptch3.ppt
ch3.ppt
 
Operating System Process Scheduling.pptx
Operating System Process Scheduling.pptxOperating System Process Scheduling.pptx
Operating System Process Scheduling.pptx
 
14712-l4.pptx
14712-l4.pptx14712-l4.pptx
14712-l4.pptx
 

Recently uploaded

Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
AnaAcapella
 

Recently uploaded (20)

Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdfDiuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
What is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxWhat is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptx
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 
Michaelis Menten Equation and Estimation Of Vmax and Tmax.pptx
Michaelis Menten Equation and Estimation Of Vmax and Tmax.pptxMichaelis Menten Equation and Estimation Of Vmax and Tmax.pptx
Michaelis Menten Equation and Estimation Of Vmax and Tmax.pptx
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learning
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Ernest Hemingway's For Whom the Bell Tolls
Ernest Hemingway's For Whom the Bell TollsErnest Hemingway's For Whom the Bell Tolls
Ernest Hemingway's For Whom the Bell Tolls
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdf
 

Operations on Processes

  • 1. Operations on Processes BY NAVID DANESHVARAN SOFTWARE ENGINEERING STUDENT AT KHARAZMI UNIVERSITY
  • 2. 2 / 11Process Creation  Parent Process  Children Process  Process identifier (pid)  Pid Tree of Processes UNIX, Linux & Windows Index to access process within the kernel
  • 3. 3 / 11Process Tree for the Linux OS UNIX and Linux ps -el
  • 4. 4 / 11Parent and Child Process  Parent Process  Directly from OS  Constrained to a Subset of the Resources of the Parent Process  Purpose: Prevent Overloading the System Child Process Needs CPU Time, Memory, Files, I/O Devices Partition or Share Some Resources
  • 5. 5 / 11Parent and Child Process  Parent Process  Create New Process  1- Parent Continues to Execute  2- Parent Waits  Address-Space Possibilities  1- Duplicate of the Parent Process  2- New Program Loaded Child Processinitialization data (input)
  • 8. 8 / 11Process Termination  Finishes Executing Its Final Statement  Delete it by exit() System Call  Status Value (Typically int) Its Parent  TerminateProcess() in Windows Parent of the Process  Reasons: 1- child has exceeded its usage 2- task assigned to the child is no longer required 3- parent terminates
  • 9. 9 / 11Process Termination  cascading termination  Zombie Process UNIX & Linux
  • 10. 10 / 11Thank You for Your Attention Any Question?
  • 11. 11 / 11Resources  A. Silberschatz, Operating System Concepts, 2012.

Editor's Notes

  1. Pid -> integer Number -> Unique Number for each process
  2. init process -> serves as the root parent process for all user processes kthreadd -> creating additional processes that perform tasks on behalf of the kernel sshd -> managing clients that connect to the system by using ssh (secure shell) login -> managing clients that directly log onto the system
  3. The parent may have to partition its resources among its children, or it may be able to share some resources (such as memory or files) among several of its children
  4. display the contents of a file —say, image.jpg— -> name of the file, name of the output device
  5. The new process consists of a copy of the address space of the original process. Both processes (the parent and the child) continue execution at the instruction after the fork(). The child process inherits privileges and scheduling attributes from the parent, as well certain resources, such as open files. /bin/ls -> The child process then overlays its address space -> used to get a directory listing. Child process completes (by either implicitly or explicitly invoking exit()).
  6. CreateProcess() -> requires loading a specified program into the address space STARTUPINFO and PROCESS INFORMATION -> Structure. STARTUPINFO -> specifies many properties of the new process, such as window size and appearance and handles to standard input and output files. PROCESS INFORMATION -> contains a handle and the identifiers to the newly created process and its thread. ZeroMemory() -> allocate memory for each of these structures. Use the parent’s existing environment block and starting directory pi.hProcess -> passed a handle of the child process.
  7. All the resources of the process -> deallocated by the operating system Parent needs to know the identities of its children.
  8. entry in the process table -> until the parent calls wait() -> process table contains the process’s exit status. Zombie Process -> A process that has terminated, but whose parent has not yet called wait(). Orphans Process -> Now consider what would happen if a parent did not invoke wait() and instead terminated -> Linux and UNIX -> assigning the init process as the new parent ->The init process periodically invokes wait().