SlideShare une entreprise Scribd logo
1  sur  31
Télécharger pour lire hors ligne
Process

   Organized By: Vinay Arora
                 Assistant Professor
                 CSED, TU




                                   Vinay Arora
                                    CSED,TU
Disclaimer

           This is NOT A COPYRIGHT          MATERIAL


   Content has been taken mainly from the following books:

        Operating Systems Concepts By Silberschatz & Galvin,
Operating Systems: Internals and Design Principles By William Stallings
                        www.os-book.com
         www.cs.jhu.edu/~yairamir/cs418/os2/sld001.htm
     www.personal.kent.edu/~rmuhamma/OpSystems/os.html
 http://msdn.microsoft.com/en-us/library/ms685096(VS.85).aspx
http://www.computer.howsttuffworks.com/operating-system6.htm
         http://williamstallings.com/OS/Animations.html
                               Etc…

                              Vinay Arora
                               CSED,TU
Process
   A Program in Execution is called as a PROCESS.

   An operating system executes a variety of programs:

      Batch System – Jobs
      Time-Shared Systems – User Programs or Tasks

   A Process Includes:

      Program Counter
      Stack
      Data Section

                                Vinay Arora
                                 CSED,TU
Process in Memory




               Vinay Arora
                CSED,TU
Process
   A Program is a Passive Entity and a Process is an Active Entity.



   Process associates PC and a set of other resources with it.



   A Program becomes a Process when an executable file is loaded into
   memory.



   Two Techniques are present for loading Executable Files.
   (Double Clicking EXE, Running EXE through Command Prompt)

                                  Vinay Arora
                                   CSED,TU
Set of Values held by a PROCESS

   # Current value of Program Counter (PC)


   # Contents of the Processors Registers


   # Value of the Variables


   # The Process Stack (SP) which typically contains temporary data
   such as subroutine parameter, return address, and temporary
   variables.

   # A Data Section that contains Global Variables.

                                 Vinay Arora
                                  CSED,TU
Process States




                 Vinay Arora
                  CSED,TU
Process States
 New State: The Process being created.


 Ready State: The Process is waiting to be assigned to a Processor.


 Running State: A Process is said to be running if it has the CPU.


 Blocked (or Waiting) State: A Process is said to be blocked if it is
 waiting for some event to happen.


 Terminated State: The Process has finished Execution.

                                    Vinay Arora
                                     CSED,TU
State Diagram




                Vinay Arora
                 CSED,TU
State Diagram




                Vinay Arora
                 CSED,TU
Process Control Block




                Vinay Arora
                 CSED,TU
Process Control Block
 Information associated with each Process

    Process state

    Program counter

    CPU registers

    CPU scheduling information

    Memory-management information

    Accounting information

    I/O status information


                                 Vinay Arora
                                  CSED,TU
Various Queues

   Job Queue – Set of all processes in the system


   Ready Queue – Set of all processes residing in main memory, ready and
   waiting to execute


   Device Queues – Set of processes waiting for an I/O device


   Processes migrate among the various queues


                                 Vinay Arora
                                  CSED,TU
Multiple Blocked Queues




                Vinay Arora
                 CSED,TU
Ready Queue




              Vinay Arora
               CSED,TU
Context Switch
   When CPU switches to another process, the system must save the state
   of the old process and load the saved state for the new process via a
   Context Switch.



   Context of a process represented in the PCB



   Context-switch time is overhead.



   Time dependent on hardware support

                                 Vinay Arora
                                  CSED,TU
Context Switching




                Vinay Arora
                 CSED,TU
CPU Switching




                Vinay Arora
                 CSED,TU
Process Scheduling Diagram




                Vinay Arora
                 CSED,TU
LSM Term Scheduler
   Long-Term Scheduler (or Job scheduler) – Selects which Processes
   should be brought into the Ready queue



   Short-Term Scheduler (or CPU scheduler) – Selects which Process
   should be executed next and allocates CPU



   Medium-Term Scheduler – Intermediate Level of Scheduling. Limit the
   Multiprogramming and executes Swapping.




                               Vinay Arora
                                CSED,TU
Medium Term Scheduler




               Vinay Arora
                CSED,TU
Parent & Child Process
  Parent Process create Children Processes, which, in turn create other
  Processes, forming a tree of Processes

  Generally, Process identified and managed via a Process Identifier (PId)

  Resource Sharing

      Parent and Children share all Resources
      Children share subset of parent’s Resources
      Parent and child share no Resources

  Execution

      Parent and Children execute Concurrently
      Parent waits until children Terminate


                                   Vinay Arora
                                    CSED,TU
Process Creation (Unix)

   UNIX Examples



   Fork System Call creates new Process.



   Exec System Call used after a fork to replace the process’ memory
   space with a new Program.




                                Vinay Arora
                                 CSED,TU
Process Creation (Unix)




                 Vinay Arora
                  CSED,TU
Tree of Processes on Solaris




                 Vinay Arora
                  CSED,TU
Process Termination
   Process executes last statement and asks the operating system to delete it (exit)

            Output data from child to parent (via wait)
            Process' resources are deallocated by operating system

   Parent may terminate execution of children processes (abort)

     Child has exceeded allocated resources

     Task assigned to child is no longer required

     If parent is exiting

           Some operating system do not allow child to continue if its parent
         terminates

   All children terminated - Cascading Termination
                                      Vinay Arora
                                       CSED,TU
InterProcess Communication
   Processes within a system may be Independent or Cooperating

   Cooperating process can affect or be affected by other processes, including
   sharing data

   Reasons for cooperating processes:

    Information sharing
    Computation speedup
    Modularity
    Convenience

   Cooperating processes need Inter Process Communication (IPC)

   Two models of IPC - Shared memory & Message passing



                                     Vinay Arora
                                      CSED,TU
Direct Communication
   Processes must name each other explicitly:

     send (P, message) –send a message to process P

     receive (Q, message) –receive a message from process Q

   Properties of Communication link

     Links are established automatically
     A link is associated with exactly one pair of communicating processes
     Between each pair there exists exactly one link
     The link may be unidirectional, but is usually bi-directional

                                 Vinay Arora
                                  CSED,TU
Interaction b/w Processes
   Data Sharing – Common Variable/Data.

   Message Passing – Communication b/w 2 processes.

   Synchronization – Coordination in Activities.

   Signals – To Convey a situation to a Process so that it can perform some
   special actions to handle the situation.

   Concurrency & Parallelism.
   Computational Speed Up.
   Scheduling & Dispatching.

                                 Vinay Arora
                                  CSED,TU
Message Passing & Shared Memory




               Vinay Arora
                CSED,TU
Thnx…



  Vinay Arora
   CSED,TU

Contenu connexe

Tendances

Process concept
Process conceptProcess concept
Process concept
jangezkhan
 
23565104 process-management(2)
23565104 process-management(2)23565104 process-management(2)
23565104 process-management(2)
Anuj Malhotra
 
Chapter 1 - Introduction
Chapter 1 - IntroductionChapter 1 - Introduction
Chapter 1 - Introduction
Wayne Jones Jnr
 

Tendances (20)

OS scheduling and The anatomy of a context switch
OS scheduling and The anatomy of a context switchOS scheduling and The anatomy of a context switch
OS scheduling and The anatomy of a context switch
 
Process management os concept
Process management os conceptProcess management os concept
Process management os concept
 
Cs8493 unit 2
Cs8493 unit 2Cs8493 unit 2
Cs8493 unit 2
 
Cs8493 unit 1
Cs8493 unit 1Cs8493 unit 1
Cs8493 unit 1
 
Cs8493 unit 3
Cs8493 unit 3Cs8493 unit 3
Cs8493 unit 3
 
Real Time Operating System
Real Time Operating SystemReal Time Operating System
Real Time Operating System
 
The Windows Scheduler
The Windows SchedulerThe Windows Scheduler
The Windows Scheduler
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
Os2
Os2Os2
Os2
 
Rtos part2
Rtos part2Rtos part2
Rtos part2
 
Process management
Process managementProcess management
Process management
 
Process concept
Process conceptProcess concept
Process concept
 
23565104 process-management(2)
23565104 process-management(2)23565104 process-management(2)
23565104 process-management(2)
 
Cs8493 unit 3
Cs8493 unit 3Cs8493 unit 3
Cs8493 unit 3
 
Chapter 1 - Introduction
Chapter 1 - IntroductionChapter 1 - Introduction
Chapter 1 - Introduction
 
7 disk managment
7 disk managment7 disk managment
7 disk managment
 
Windows process-scheduling
Windows process-schedulingWindows process-scheduling
Windows process-scheduling
 
Process scheduling linux
Process scheduling linuxProcess scheduling linux
Process scheduling linux
 
Windows process scheduling presentation
Windows process scheduling presentationWindows process scheduling presentation
Windows process scheduling presentation
 
Operating system
Operating systemOperating system
Operating system
 

Similaire à OS - Process

OS - Introduction to Operating Systems
OS - Introduction to Operating SystemsOS - Introduction to Operating Systems
OS - Introduction to Operating Systems
vinay arora
 
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
 
OS_Unit II - Process Management_CATI.pptx
OS_Unit II - Process Management_CATI.pptxOS_Unit II - Process Management_CATI.pptx
OS_Unit II - Process Management_CATI.pptx
Gokhul2
 
Operating Systems Unit Two - Fourth Semester - Engineering
Operating Systems Unit Two - Fourth Semester - EngineeringOperating Systems Unit Two - Fourth Semester - Engineering
Operating Systems Unit Two - Fourth Semester - Engineering
Yogesh Santhan
 
OS - System Structure
OS - System StructureOS - System Structure
OS - System Structure
vinay arora
 

Similaire à OS - Process (20)

OS - Introduction to Operating Systems
OS - Introduction to Operating SystemsOS - Introduction to Operating Systems
OS - Introduction to Operating Systems
 
L-5 BCEProcess management.ppt
L-5 BCEProcess management.pptL-5 BCEProcess management.ppt
L-5 BCEProcess management.ppt
 
Operating System
Operating SystemOperating System
Operating System
 
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncationLM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
 
Process concept
Process conceptProcess concept
Process concept
 
Ch03- PROCESSES.ppt
Ch03- PROCESSES.pptCh03- PROCESSES.ppt
Ch03- PROCESSES.ppt
 
unit-2.pdf
unit-2.pdfunit-2.pdf
unit-2.pdf
 
OS-Process.pdf
OS-Process.pdfOS-Process.pdf
OS-Process.pdf
 
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
 
Process
ProcessProcess
Process
 
Processes
ProcessesProcesses
Processes
 
CS9222 Advanced Operating System
CS9222 Advanced Operating SystemCS9222 Advanced Operating System
CS9222 Advanced Operating System
 
Lecture_Slide_4.pptx
Lecture_Slide_4.pptxLecture_Slide_4.pptx
Lecture_Slide_4.pptx
 
4 process
4 process4 process
4 process
 
OS_Unit II - Process Management_CATI.pptx
OS_Unit II - Process Management_CATI.pptxOS_Unit II - Process Management_CATI.pptx
OS_Unit II - Process Management_CATI.pptx
 
Operating Systems Unit Two - Fourth Semester - Engineering
Operating Systems Unit Two - Fourth Semester - EngineeringOperating Systems Unit Two - Fourth Semester - Engineering
Operating Systems Unit Two - Fourth Semester - Engineering
 
OS - System Structure
OS - System StructureOS - System Structure
OS - System Structure
 
Chapter 3.pdf
Chapter 3.pdfChapter 3.pdf
Chapter 3.pdf
 
UNIT-2-Process-Management.pdf
UNIT-2-Process-Management.pdfUNIT-2-Process-Management.pdf
UNIT-2-Process-Management.pdf
 
Basic os-concepts
Basic os-conceptsBasic os-concepts
Basic os-concepts
 

Plus de vinay arora (20)

Search engine and web crawler
Search engine and web crawlerSearch engine and web crawler
Search engine and web crawler
 
Use case diagram (airport)
Use case diagram (airport)Use case diagram (airport)
Use case diagram (airport)
 
Use case diagram
Use case diagramUse case diagram
Use case diagram
 
Lab exercise questions (AD & CD)
Lab exercise questions (AD & CD)Lab exercise questions (AD & CD)
Lab exercise questions (AD & CD)
 
SEM - UML (1st case study)
SEM - UML (1st case study)SEM - UML (1st case study)
SEM - UML (1st case study)
 
6 java - loop
6  java - loop6  java - loop
6 java - loop
 
4 java - decision
4  java - decision4  java - decision
4 java - decision
 
3 java - variable type
3  java - variable type3  java - variable type
3 java - variable type
 
2 java - operators
2  java - operators2  java - operators
2 java - operators
 
1 java - data type
1  java - data type1  java - data type
1 java - data type
 
Uta005 lecture3
Uta005 lecture3Uta005 lecture3
Uta005 lecture3
 
Uta005 lecture1
Uta005 lecture1Uta005 lecture1
Uta005 lecture1
 
Uta005 lecture2
Uta005 lecture2Uta005 lecture2
Uta005 lecture2
 
Security & Protection
Security & ProtectionSecurity & Protection
Security & Protection
 
Process Synchronization
Process SynchronizationProcess Synchronization
Process Synchronization
 
CG - Output Primitives
CG - Output PrimitivesCG - Output Primitives
CG - Output Primitives
 
CG - Display Devices
CG - Display DevicesCG - Display Devices
CG - Display Devices
 
CG - Input Output Devices
CG - Input Output DevicesCG - Input Output Devices
CG - Input Output Devices
 
CG - Introduction to Computer Graphics
CG - Introduction to Computer GraphicsCG - Introduction to Computer Graphics
CG - Introduction to Computer Graphics
 
C Prog. - Strings (Updated)
C Prog. - Strings (Updated)C Prog. - Strings (Updated)
C Prog. - Strings (Updated)
 

Dernier

Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
MateoGardella
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
MateoGardella
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 

Dernier (20)

Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 

OS - Process

  • 1. Process Organized By: Vinay Arora Assistant Professor CSED, TU Vinay Arora CSED,TU
  • 2. Disclaimer This is NOT A COPYRIGHT MATERIAL Content has been taken mainly from the following books: Operating Systems Concepts By Silberschatz & Galvin, Operating Systems: Internals and Design Principles By William Stallings www.os-book.com www.cs.jhu.edu/~yairamir/cs418/os2/sld001.htm www.personal.kent.edu/~rmuhamma/OpSystems/os.html http://msdn.microsoft.com/en-us/library/ms685096(VS.85).aspx http://www.computer.howsttuffworks.com/operating-system6.htm http://williamstallings.com/OS/Animations.html Etc… Vinay Arora CSED,TU
  • 3. Process A Program in Execution is called as a PROCESS. An operating system executes a variety of programs: Batch System – Jobs Time-Shared Systems – User Programs or Tasks A Process Includes: Program Counter Stack Data Section Vinay Arora CSED,TU
  • 4. Process in Memory Vinay Arora CSED,TU
  • 5. Process A Program is a Passive Entity and a Process is an Active Entity. Process associates PC and a set of other resources with it. A Program becomes a Process when an executable file is loaded into memory. Two Techniques are present for loading Executable Files. (Double Clicking EXE, Running EXE through Command Prompt) Vinay Arora CSED,TU
  • 6. Set of Values held by a PROCESS # Current value of Program Counter (PC) # Contents of the Processors Registers # Value of the Variables # The Process Stack (SP) which typically contains temporary data such as subroutine parameter, return address, and temporary variables. # A Data Section that contains Global Variables. Vinay Arora CSED,TU
  • 7. Process States Vinay Arora CSED,TU
  • 8. Process States New State: The Process being created. Ready State: The Process is waiting to be assigned to a Processor. Running State: A Process is said to be running if it has the CPU. Blocked (or Waiting) State: A Process is said to be blocked if it is waiting for some event to happen. Terminated State: The Process has finished Execution. Vinay Arora CSED,TU
  • 9. State Diagram Vinay Arora CSED,TU
  • 10. State Diagram Vinay Arora CSED,TU
  • 11. Process Control Block Vinay Arora CSED,TU
  • 12. Process Control Block Information associated with each Process Process state Program counter CPU registers CPU scheduling information Memory-management information Accounting information I/O status information Vinay Arora CSED,TU
  • 13. Various Queues Job Queue – Set of all processes in the system Ready Queue – Set of all processes residing in main memory, ready and waiting to execute Device Queues – Set of processes waiting for an I/O device Processes migrate among the various queues Vinay Arora CSED,TU
  • 14. Multiple Blocked Queues Vinay Arora CSED,TU
  • 15. Ready Queue Vinay Arora CSED,TU
  • 16. Context Switch When CPU switches to another process, the system must save the state of the old process and load the saved state for the new process via a Context Switch. Context of a process represented in the PCB Context-switch time is overhead. Time dependent on hardware support Vinay Arora CSED,TU
  • 17. Context Switching Vinay Arora CSED,TU
  • 18. CPU Switching Vinay Arora CSED,TU
  • 19. Process Scheduling Diagram Vinay Arora CSED,TU
  • 20. LSM Term Scheduler Long-Term Scheduler (or Job scheduler) – Selects which Processes should be brought into the Ready queue Short-Term Scheduler (or CPU scheduler) – Selects which Process should be executed next and allocates CPU Medium-Term Scheduler – Intermediate Level of Scheduling. Limit the Multiprogramming and executes Swapping. Vinay Arora CSED,TU
  • 21. Medium Term Scheduler Vinay Arora CSED,TU
  • 22. Parent & Child Process Parent Process create Children Processes, which, in turn create other Processes, forming a tree of Processes Generally, Process identified and managed via a Process Identifier (PId) Resource Sharing Parent and Children share all Resources Children share subset of parent’s Resources Parent and child share no Resources Execution Parent and Children execute Concurrently Parent waits until children Terminate Vinay Arora CSED,TU
  • 23. Process Creation (Unix) UNIX Examples Fork System Call creates new Process. Exec System Call used after a fork to replace the process’ memory space with a new Program. Vinay Arora CSED,TU
  • 24. Process Creation (Unix) Vinay Arora CSED,TU
  • 25. Tree of Processes on Solaris Vinay Arora CSED,TU
  • 26. Process Termination Process executes last statement and asks the operating system to delete it (exit) Output data from child to parent (via wait) Process' resources are deallocated by operating system Parent may terminate execution of children processes (abort) Child has exceeded allocated resources Task assigned to child is no longer required If parent is exiting Some operating system do not allow child to continue if its parent terminates All children terminated - Cascading Termination Vinay Arora CSED,TU
  • 27. InterProcess Communication Processes within a system may be Independent or Cooperating Cooperating process can affect or be affected by other processes, including sharing data Reasons for cooperating processes: Information sharing Computation speedup Modularity Convenience Cooperating processes need Inter Process Communication (IPC) Two models of IPC - Shared memory & Message passing Vinay Arora CSED,TU
  • 28. Direct Communication Processes must name each other explicitly: send (P, message) –send a message to process P receive (Q, message) –receive a message from process Q Properties of Communication link Links are established automatically A link is associated with exactly one pair of communicating processes Between each pair there exists exactly one link The link may be unidirectional, but is usually bi-directional Vinay Arora CSED,TU
  • 29. Interaction b/w Processes Data Sharing – Common Variable/Data. Message Passing – Communication b/w 2 processes. Synchronization – Coordination in Activities. Signals – To Convey a situation to a Process so that it can perform some special actions to handle the situation. Concurrency & Parallelism. Computational Speed Up. Scheduling & Dispatching. Vinay Arora CSED,TU
  • 30. Message Passing & Shared Memory Vinay Arora CSED,TU
  • 31. Thnx… Vinay Arora CSED,TU