SlideShare a Scribd company logo
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

More Related Content

What's hot

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
Daniel Ben-Zvi
 
Process management os concept
Process management os conceptProcess management os concept
Process management os concept
priyadeosarkar91
 
Cs8493 unit 2
Cs8493 unit 2Cs8493 unit 2
Cs8493 unit 2
Kathirvel Ayyaswamy
 
Cs8493 unit 1
Cs8493 unit 1Cs8493 unit 1
Cs8493 unit 1
Kathirvel Ayyaswamy
 
Cs8493 unit 3
Cs8493 unit 3Cs8493 unit 3
Cs8493 unit 3
Kathirvel Ayyaswamy
 
Real Time Operating System
Real Time Operating SystemReal Time Operating System
Real Time Operating System
Sharad Pandey
 
The Windows Scheduler
The Windows SchedulerThe Windows Scheduler
The Windows Scheduler
Peter Shirley-Quirk
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
vampugani
 
Process management
Process managementProcess management
Process management
Birju Tank
 
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
 
Cs8493 unit 3
Cs8493 unit 3Cs8493 unit 3
Cs8493 unit 3
Kathirvel Ayyaswamy
 
Chapter 1 - Introduction
Chapter 1 - IntroductionChapter 1 - Introduction
Chapter 1 - IntroductionWayne Jones Jnr
 
7 disk managment
7 disk managment7 disk managment
7 disk managment
ashishkhatu1
 
Windows process-scheduling
Windows process-schedulingWindows process-scheduling
Windows process-scheduling
Talha Shaikh
 
Windows process scheduling presentation
Windows process scheduling presentationWindows process scheduling presentation
Windows process scheduling presentation
Talha Shaikh
 
Operating system
Operating systemOperating system
Operating system
Prof. Dr. K. Adisesha
 

What's hot (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
 

Similar to OS - Process

OS - Introduction to Operating Systems
OS - Introduction to Operating SystemsOS - Introduction to Operating Systems
OS - Introduction to Operating Systemsvinay arora
 
L-5 BCEProcess management.ppt
L-5 BCEProcess management.pptL-5 BCEProcess management.ppt
L-5 BCEProcess management.ppt
Kirti Verma
 
Operating System
Operating SystemOperating System
Operating System
Subhasis Dash
 
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncationLM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
Mani Deepak Choudhry
 
Ch03- PROCESSES.ppt
Ch03- PROCESSES.pptCh03- PROCESSES.ppt
Ch03- PROCESSES.ppt
MeghaSharma474761
 
unit-2.pdf
unit-2.pdfunit-2.pdf
unit-2.pdf
071ROHETHSIT
 
OS-Process.pdf
OS-Process.pdfOS-Process.pdf
OS-Process.pdf
Rakibul Rakib
 
OS_Unit_II_Ch3 Process and CPU Scheduling
OS_Unit_II_Ch3 Process and CPU SchedulingOS_Unit_II_Ch3 Process and CPU Scheduling
OS_Unit_II_Ch3 Process and CPU Scheduling
SDivya19
 
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
 
Processes
ProcessesProcesses
Processes
vampugani
 
CS9222 Advanced Operating System
CS9222 Advanced Operating SystemCS9222 Advanced Operating System
CS9222 Advanced Operating System
Kathirvel Ayyaswamy
 
Lecture_Slide_4.pptx
Lecture_Slide_4.pptxLecture_Slide_4.pptx
Lecture_Slide_4.pptx
DiptoRoy21
 
4 process
4 process4 process
4 process
Renatus Mushi
 
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 Structurevinay arora
 
Chapter 3.pdf
Chapter 3.pdfChapter 3.pdf
Chapter 3.pdf
HikaTariku
 
UNIT-2-Process-Management.pdf
UNIT-2-Process-Management.pdfUNIT-2-Process-Management.pdf
UNIT-2-Process-Management.pdf
aakritii765
 

Similar to 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
 
OS_Unit_II_Ch3 Process and CPU Scheduling
OS_Unit_II_Ch3 Process and CPU SchedulingOS_Unit_II_Ch3 Process and CPU Scheduling
OS_Unit_II_Ch3 Process and CPU Scheduling
 
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
 

More from vinay arora

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

More from 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)
 

Recently uploaded

The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
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
 
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
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
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
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
kimdan468
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
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
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
goswamiyash170123
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
Kartik Tiwari
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
gb193092
 
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
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
Krisztián Száraz
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 

Recently uploaded (20)

The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
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
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
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
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
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
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
 
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
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 

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