SlideShare a Scribd company logo
Understand Process Management
       • Relationship Between Processes




                                          1
Recap

In the last class, you have learnt
• Process Creation

• Process Termination


     HOME     PREVIOUS TOPIC
     NEXT
     PREVIOUS QUESTION PAPERS
     FOR OS
     CPP TUTORIALS
                     9CM402.14       2
Objectives


On completion of this class, you will be able to
  know

• Relationship between Processes

• Reasons for providing an environment that allows
  Process cooperation



                        9CM402.14                    3
Relationship Between Processes
• Concurrent processes executing in the operating system may be


 either “Independent processes” or “Cooperating processes”
• A process is independent if it cannot affect or be affected by the
 other processes executing in the system
• A process that does not share any data with any other process is
 independent Process
• A Process is a cooperating, if it can affect or be affected by the
 other processes executing in the system
• Any process that shares data with other processes is a
                            9CM402.14                           4
 cooperating process
Relationship Between Processes

Reasons for Process cooperation

• Information sharing

• Computation speedup

• Modularity

• Convenience



                        9CM402.14         5
Relationship Between Processes
Information Sharing
• Several users may be interested in same piece of information,
  Ex. Shared file
• Must provide an environment to allow concurrent access to
  these types of resources
Computation Speedup
• To run a particular task faster, we must break it into subtasks
• Each of the subtask will execute in parallel with others
• This is possible only if computer has multiple processing
  elements ( CPU or I/O channels)
                             9CM402.14                         6
Relationship Between Processes

Modularity:
• For cooperating between systems we have to construct the
  system in a modular fashion
• Dividing the system function into separate processes or
  threads
Convenience:
• Even an individual user may work on many tasks at the same
  time
• For instance, a user may be editing, printing and compiling in
  parallel


                             9CM402.14                         7
Cooperating Processors

• Concurrent execution that requires cooperation among the
  processes requires mechanisms to allow processes
  communicate with one another
• To illustrate the concept of cooperating processes look at the
   – Example: Producers-consumers problem
• A producer process produces information that is consumed by
  a consumer process
   – Example :
       • A print program produces character that are consumed
         by the printer driver9CM402.14                        8
Cooperating Processes
• To concurrently run producers and consumers processes we
  must have a buffer of items that can be filled by the producer
  and emptied by the consumer
• A producer can produces one item while the consumer is
  consuming another item
• The producer and consumer must be synchronized, so that
   – the consumer does not try to consume an item that has not yet been
     produced

• The consumer must wait until an item is produced
                                9CM402.14                                 9
Example
• Solutions to producer-consumer problem may implement the
  buffer interface shown follows
   Interface for buffer implementation
  Public interface Buffer
  {
   // producers call this method
  public abstract void insert (object item);
   // consumers call this method
   public abstract object remove( );
  }
                               9CM402.14                     10
Example
• The producer process involves the insert( ) method when It
  wishes to enter an item in the buffer
 insert( ) method
Public void insert (object item){
 While (count= = BUFFER SIZE)
     ; // do nothing - - no free buffers
       + + count;
       buffer [in]=item;
       in=(in+1) % BUFFER -SIZE;
 }
                                9CM402.14                      11
Example
•   The consumer calls the remove( ) method when it wants to consume an item
    from the buffer
    remove method
    Public object remove ( ) {
    Object item;
    While (count= = 0)
        ; // do nothing - - nothing to consume
        // remove an item from the buffer
        --count;
        item=buffer [out];
        out=(out+1) % BUFFER _ SIZE;

         return item; }              9CM402.14                           12
Summary

In this class, you have learnt
• Relationship between the processes

• Reasons for Process cooperation
• Cooperating Processes




                             9CM402.14   13
Frequently Asked Questions

1.   Explain about cooperating process

2.   What are the several reasons for cooperating processes

3.   Explain about the relationship between processes




                           9CM402.14                          14
Quiz

1.   A process is ____________ if it cannot affect or be
     affected by the other processes executing in the system
a)   Independent
b)   Dependent
c)   Cooperating




                           9CM402.14                           15
Quiz


2.   A process is ________ if it can affect or be affected by
     other processes executing in the system.
a)   Cooperating
b)   Independent
c)   Dependent




                            9CM402.14                           16
Quiz


3. A process that does not share any data with any
  other process is
a)Independent Process
b) Cooperating
c) Dependent




                    9CM402.14                   17
Other subject materials
•   Web designing
•   Micro processors
•   C++ tutorials
•   java

home

More Related Content

What's hot

Introduction to Distributed System
Introduction to Distributed SystemIntroduction to Distributed System
Introduction to Distributed System
Sunita Sahu
 
Paging and segmentation
Paging and segmentationPaging and segmentation
Paging and segmentation
Piyush Rochwani
 
Disk structure
Disk structureDisk structure
Disk structure
Shareb Ismaeel
 
Distributed file system
Distributed file systemDistributed file system
Distributed file system
Anamika Singh
 
Threads (operating System)
Threads (operating System)Threads (operating System)
Threads (operating System)
Prakhar Maurya
 
CPU Scheduling Algorithms
CPU Scheduling AlgorithmsCPU Scheduling Algorithms
CPU Scheduling Algorithms
Shubhashish Punj
 
Multiprocessor
MultiprocessorMultiprocessor
Multiprocessor
Neel Patel
 
Lecture 2 more about parallel computing
Lecture 2   more about parallel computingLecture 2   more about parallel computing
Lecture 2 more about parallel computing
Vajira Thambawita
 
Inter Process Communication
Inter Process CommunicationInter Process Communication
Inter Process Communication
Adeel Rasheed
 
Thread scheduling in Operating Systems
Thread scheduling in Operating SystemsThread scheduling in Operating Systems
Thread scheduling in Operating Systems
Nitish Gulati
 
Process management os concept
Process management os conceptProcess management os concept
Process management os concept
priyadeosarkar91
 
Threads .ppt
Threads .pptThreads .ppt
Threads .ppt
meet darji
 
Cloud Reference Model
Cloud Reference ModelCloud Reference Model
Cloud Reference Model
Dr. Ramkumar Lakshminarayanan
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithms
Piyush Rochwani
 
Levels of Virtualization.docx
Levels of Virtualization.docxLevels of Virtualization.docx
Levels of Virtualization.docx
kumari36
 
Distributed Operating System_4
Distributed Operating System_4Distributed Operating System_4
Distributed Operating System_4
Dr Sandeep Kumar Poonia
 
Distributed and clustered systems
Distributed and clustered systemsDistributed and clustered systems
Distributed and clustered systems
V.V.Vanniaperumal College for Women
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
Riya Choudhary
 
Deadlock ppt
Deadlock ppt Deadlock ppt
Deadlock ppt
Sweetestangel Kochar
 
File Management in Operating Systems
File Management in Operating SystemsFile Management in Operating Systems
File Management in Operating Systems
vampugani
 

What's hot (20)

Introduction to Distributed System
Introduction to Distributed SystemIntroduction to Distributed System
Introduction to Distributed System
 
Paging and segmentation
Paging and segmentationPaging and segmentation
Paging and segmentation
 
Disk structure
Disk structureDisk structure
Disk structure
 
Distributed file system
Distributed file systemDistributed file system
Distributed file system
 
Threads (operating System)
Threads (operating System)Threads (operating System)
Threads (operating System)
 
CPU Scheduling Algorithms
CPU Scheduling AlgorithmsCPU Scheduling Algorithms
CPU Scheduling Algorithms
 
Multiprocessor
MultiprocessorMultiprocessor
Multiprocessor
 
Lecture 2 more about parallel computing
Lecture 2   more about parallel computingLecture 2   more about parallel computing
Lecture 2 more about parallel computing
 
Inter Process Communication
Inter Process CommunicationInter Process Communication
Inter Process Communication
 
Thread scheduling in Operating Systems
Thread scheduling in Operating SystemsThread scheduling in Operating Systems
Thread scheduling in Operating Systems
 
Process management os concept
Process management os conceptProcess management os concept
Process management os concept
 
Threads .ppt
Threads .pptThreads .ppt
Threads .ppt
 
Cloud Reference Model
Cloud Reference ModelCloud Reference Model
Cloud Reference Model
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithms
 
Levels of Virtualization.docx
Levels of Virtualization.docxLevels of Virtualization.docx
Levels of Virtualization.docx
 
Distributed Operating System_4
Distributed Operating System_4Distributed Operating System_4
Distributed Operating System_4
 
Distributed and clustered systems
Distributed and clustered systemsDistributed and clustered systems
Distributed and clustered systems
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
 
Deadlock ppt
Deadlock ppt Deadlock ppt
Deadlock ppt
 
File Management in Operating Systems
File Management in Operating SystemsFile Management in Operating Systems
File Management in Operating Systems
 

Similar to 14 relationship between processes

Ipc feb4
Ipc feb4Ipc feb4
Ipc feb4
yashnand
 
Producer Consumer Problem in C explained.ppt
Producer Consumer Problem in C explained.pptProducer Consumer Problem in C explained.ppt
Producer Consumer Problem in C explained.ppt
ossama8
 
Lecture 5- Process Synchonization_revised.pdf
Lecture 5- Process Synchonization_revised.pdfLecture 5- Process Synchonization_revised.pdf
Lecture 5- Process Synchonization_revised.pdf
Amanuelmergia
 
OS_Ch06.pdf
OS_Ch06.pdfOS_Ch06.pdf
OS_Ch06.pdf
ismailsaleh63
 
CHAP4.pptx
CHAP4.pptxCHAP4.pptx
CHAP4.pptx
ansariparveen06
 
COCOMO
COCOMOCOCOMO
Presentation: Why Usability Testing Should be Part of your Accessibility Test...
Presentation: Why Usability Testing Should be Part of your Accessibility Test...Presentation: Why Usability Testing Should be Part of your Accessibility Test...
Presentation: Why Usability Testing Should be Part of your Accessibility Test...
User Experience Center, Bentley University
 
Foundational Design Patterns for Multi-Purpose Applications
Foundational Design Patterns for Multi-Purpose ApplicationsFoundational Design Patterns for Multi-Purpose Applications
Foundational Design Patterns for Multi-Purpose Applications
Ching-Hwa Yu
 
6 multiprogramming & time sharing
6 multiprogramming & time sharing6 multiprogramming & time sharing
6 multiprogramming & time sharing
myrajendra
 
Operating Systems - Process Scheduling Management
Operating Systems - Process Scheduling ManagementOperating Systems - Process Scheduling Management
Operating Systems - Process Scheduling Management
Chandrakant Divate
 
UNIT IV DESIGN PATTERNS.pptx
UNIT IV DESIGN PATTERNS.pptxUNIT IV DESIGN PATTERNS.pptx
UNIT IV DESIGN PATTERNS.pptx
anguraju1
 
【Unite 2017 Tokyo】C#ジョブシステムによるモバイルゲームのパフォーマンス向上テクニック
【Unite 2017 Tokyo】C#ジョブシステムによるモバイルゲームのパフォーマンス向上テクニック【Unite 2017 Tokyo】C#ジョブシステムによるモバイルゲームのパフォーマンス向上テクニック
【Unite 2017 Tokyo】C#ジョブシステムによるモバイルゲームのパフォーマンス向上テクニック
Unity Technologies Japan K.K.
 
Lecture_3-Process Management.pdf
Lecture_3-Process Management.pdfLecture_3-Process Management.pdf
Lecture_3-Process Management.pdf
Harika Pudugosula
 
Software Engineering Lec 8-design-
Software Engineering Lec 8-design-Software Engineering Lec 8-design-
Software Engineering Lec 8-design-
Taymoor Nazmy
 
Software engineering project(srs)!!
Software engineering project(srs)!!Software engineering project(srs)!!
Software engineering project(srs)!!
sourav verma
 
HOW TO PHYSICALLY DESIGN A COMPUTER BASED INFORMATION SYSTEM
HOW TO PHYSICALLY DESIGN A COMPUTER BASED INFORMATION SYSTEMHOW TO PHYSICALLY DESIGN A COMPUTER BASED INFORMATION SYSTEM
HOW TO PHYSICALLY DESIGN A COMPUTER BASED INFORMATION SYSTEM
RebekahSamuel2
 
6multiprogrammingtimesharing 130112050125-phpapp01
6multiprogrammingtimesharing 130112050125-phpapp016multiprogrammingtimesharing 130112050125-phpapp01
6multiprogrammingtimesharing 130112050125-phpapp01
Gaurav Kumar
 
ScalaUA - distage: Staged Dependency Injection
ScalaUA - distage: Staged Dependency InjectionScalaUA - distage: Staged Dependency Injection
ScalaUA - distage: Staged Dependency Injection
7mind
 
Chapter-1.ppt
Chapter-1.pptChapter-1.ppt
Chapter-1.ppt
KanadamKarteekaPavan1
 
I07 Simulation
I07 SimulationI07 Simulation
I07 Simulation
Leanleaders.org
 

Similar to 14 relationship between processes (20)

Ipc feb4
Ipc feb4Ipc feb4
Ipc feb4
 
Producer Consumer Problem in C explained.ppt
Producer Consumer Problem in C explained.pptProducer Consumer Problem in C explained.ppt
Producer Consumer Problem in C explained.ppt
 
Lecture 5- Process Synchonization_revised.pdf
Lecture 5- Process Synchonization_revised.pdfLecture 5- Process Synchonization_revised.pdf
Lecture 5- Process Synchonization_revised.pdf
 
OS_Ch06.pdf
OS_Ch06.pdfOS_Ch06.pdf
OS_Ch06.pdf
 
CHAP4.pptx
CHAP4.pptxCHAP4.pptx
CHAP4.pptx
 
COCOMO
COCOMOCOCOMO
COCOMO
 
Presentation: Why Usability Testing Should be Part of your Accessibility Test...
Presentation: Why Usability Testing Should be Part of your Accessibility Test...Presentation: Why Usability Testing Should be Part of your Accessibility Test...
Presentation: Why Usability Testing Should be Part of your Accessibility Test...
 
Foundational Design Patterns for Multi-Purpose Applications
Foundational Design Patterns for Multi-Purpose ApplicationsFoundational Design Patterns for Multi-Purpose Applications
Foundational Design Patterns for Multi-Purpose Applications
 
6 multiprogramming & time sharing
6 multiprogramming & time sharing6 multiprogramming & time sharing
6 multiprogramming & time sharing
 
Operating Systems - Process Scheduling Management
Operating Systems - Process Scheduling ManagementOperating Systems - Process Scheduling Management
Operating Systems - Process Scheduling Management
 
UNIT IV DESIGN PATTERNS.pptx
UNIT IV DESIGN PATTERNS.pptxUNIT IV DESIGN PATTERNS.pptx
UNIT IV DESIGN PATTERNS.pptx
 
【Unite 2017 Tokyo】C#ジョブシステムによるモバイルゲームのパフォーマンス向上テクニック
【Unite 2017 Tokyo】C#ジョブシステムによるモバイルゲームのパフォーマンス向上テクニック【Unite 2017 Tokyo】C#ジョブシステムによるモバイルゲームのパフォーマンス向上テクニック
【Unite 2017 Tokyo】C#ジョブシステムによるモバイルゲームのパフォーマンス向上テクニック
 
Lecture_3-Process Management.pdf
Lecture_3-Process Management.pdfLecture_3-Process Management.pdf
Lecture_3-Process Management.pdf
 
Software Engineering Lec 8-design-
Software Engineering Lec 8-design-Software Engineering Lec 8-design-
Software Engineering Lec 8-design-
 
Software engineering project(srs)!!
Software engineering project(srs)!!Software engineering project(srs)!!
Software engineering project(srs)!!
 
HOW TO PHYSICALLY DESIGN A COMPUTER BASED INFORMATION SYSTEM
HOW TO PHYSICALLY DESIGN A COMPUTER BASED INFORMATION SYSTEMHOW TO PHYSICALLY DESIGN A COMPUTER BASED INFORMATION SYSTEM
HOW TO PHYSICALLY DESIGN A COMPUTER BASED INFORMATION SYSTEM
 
6multiprogrammingtimesharing 130112050125-phpapp01
6multiprogrammingtimesharing 130112050125-phpapp016multiprogrammingtimesharing 130112050125-phpapp01
6multiprogrammingtimesharing 130112050125-phpapp01
 
ScalaUA - distage: Staged Dependency Injection
ScalaUA - distage: Staged Dependency InjectionScalaUA - distage: Staged Dependency Injection
ScalaUA - distage: Staged Dependency Injection
 
Chapter-1.ppt
Chapter-1.pptChapter-1.ppt
Chapter-1.ppt
 
I07 Simulation
I07 SimulationI07 Simulation
I07 Simulation
 

More from myrajendra

Fundamentals
FundamentalsFundamentals
Fundamentals
myrajendra
 
Data type
Data typeData type
Data type
myrajendra
 
Hibernate example1
Hibernate example1Hibernate example1
Hibernate example1
myrajendra
 
Jdbc workflow
Jdbc workflowJdbc workflow
Jdbc workflow
myrajendra
 
2 jdbc drivers
2 jdbc drivers2 jdbc drivers
2 jdbc drivers
myrajendra
 
3 jdbc api
3 jdbc api3 jdbc api
3 jdbc api
myrajendra
 
4 jdbc step1
4 jdbc step14 jdbc step1
4 jdbc step1
myrajendra
 
Dao example
Dao exampleDao example
Dao example
myrajendra
 
Sessionex1
Sessionex1Sessionex1
Sessionex1
myrajendra
 
Internal
InternalInternal
Internal
myrajendra
 
3. elements
3. elements3. elements
3. elements
myrajendra
 
2. attributes
2. attributes2. attributes
2. attributes
myrajendra
 
1 introduction to html
1 introduction to html1 introduction to html
1 introduction to html
myrajendra
 
Headings
HeadingsHeadings
Headings
myrajendra
 
Forms
FormsForms
Forms
myrajendra
 
Css
CssCss
Views
ViewsViews
Views
myrajendra
 
Views
ViewsViews
Views
myrajendra
 
Views
ViewsViews
Views
myrajendra
 
Starting jdbc
Starting jdbcStarting jdbc
Starting jdbc
myrajendra
 

More from myrajendra (20)

Fundamentals
FundamentalsFundamentals
Fundamentals
 
Data type
Data typeData type
Data type
 
Hibernate example1
Hibernate example1Hibernate example1
Hibernate example1
 
Jdbc workflow
Jdbc workflowJdbc workflow
Jdbc workflow
 
2 jdbc drivers
2 jdbc drivers2 jdbc drivers
2 jdbc drivers
 
3 jdbc api
3 jdbc api3 jdbc api
3 jdbc api
 
4 jdbc step1
4 jdbc step14 jdbc step1
4 jdbc step1
 
Dao example
Dao exampleDao example
Dao example
 
Sessionex1
Sessionex1Sessionex1
Sessionex1
 
Internal
InternalInternal
Internal
 
3. elements
3. elements3. elements
3. elements
 
2. attributes
2. attributes2. attributes
2. attributes
 
1 introduction to html
1 introduction to html1 introduction to html
1 introduction to html
 
Headings
HeadingsHeadings
Headings
 
Forms
FormsForms
Forms
 
Css
CssCss
Css
 
Views
ViewsViews
Views
 
Views
ViewsViews
Views
 
Views
ViewsViews
Views
 
Starting jdbc
Starting jdbcStarting jdbc
Starting jdbc
 

14 relationship between processes

  • 1. Understand Process Management • Relationship Between Processes 1
  • 2. Recap In the last class, you have learnt • Process Creation • Process Termination HOME PREVIOUS TOPIC NEXT PREVIOUS QUESTION PAPERS FOR OS CPP TUTORIALS 9CM402.14 2
  • 3. Objectives On completion of this class, you will be able to know • Relationship between Processes • Reasons for providing an environment that allows Process cooperation 9CM402.14 3
  • 4. Relationship Between Processes • Concurrent processes executing in the operating system may be either “Independent processes” or “Cooperating processes” • A process is independent if it cannot affect or be affected by the other processes executing in the system • A process that does not share any data with any other process is independent Process • A Process is a cooperating, if it can affect or be affected by the other processes executing in the system • Any process that shares data with other processes is a 9CM402.14 4 cooperating process
  • 5. Relationship Between Processes Reasons for Process cooperation • Information sharing • Computation speedup • Modularity • Convenience 9CM402.14 5
  • 6. Relationship Between Processes Information Sharing • Several users may be interested in same piece of information, Ex. Shared file • Must provide an environment to allow concurrent access to these types of resources Computation Speedup • To run a particular task faster, we must break it into subtasks • Each of the subtask will execute in parallel with others • This is possible only if computer has multiple processing elements ( CPU or I/O channels) 9CM402.14 6
  • 7. Relationship Between Processes Modularity: • For cooperating between systems we have to construct the system in a modular fashion • Dividing the system function into separate processes or threads Convenience: • Even an individual user may work on many tasks at the same time • For instance, a user may be editing, printing and compiling in parallel 9CM402.14 7
  • 8. Cooperating Processors • Concurrent execution that requires cooperation among the processes requires mechanisms to allow processes communicate with one another • To illustrate the concept of cooperating processes look at the – Example: Producers-consumers problem • A producer process produces information that is consumed by a consumer process – Example : • A print program produces character that are consumed by the printer driver9CM402.14 8
  • 9. Cooperating Processes • To concurrently run producers and consumers processes we must have a buffer of items that can be filled by the producer and emptied by the consumer • A producer can produces one item while the consumer is consuming another item • The producer and consumer must be synchronized, so that – the consumer does not try to consume an item that has not yet been produced • The consumer must wait until an item is produced 9CM402.14 9
  • 10. Example • Solutions to producer-consumer problem may implement the buffer interface shown follows Interface for buffer implementation Public interface Buffer { // producers call this method public abstract void insert (object item); // consumers call this method public abstract object remove( ); } 9CM402.14 10
  • 11. Example • The producer process involves the insert( ) method when It wishes to enter an item in the buffer insert( ) method Public void insert (object item){ While (count= = BUFFER SIZE) ; // do nothing - - no free buffers + + count; buffer [in]=item; in=(in+1) % BUFFER -SIZE; } 9CM402.14 11
  • 12. Example • The consumer calls the remove( ) method when it wants to consume an item from the buffer remove method Public object remove ( ) { Object item; While (count= = 0) ; // do nothing - - nothing to consume // remove an item from the buffer --count; item=buffer [out]; out=(out+1) % BUFFER _ SIZE; return item; } 9CM402.14 12
  • 13. Summary In this class, you have learnt • Relationship between the processes • Reasons for Process cooperation • Cooperating Processes 9CM402.14 13
  • 14. Frequently Asked Questions 1. Explain about cooperating process 2. What are the several reasons for cooperating processes 3. Explain about the relationship between processes 9CM402.14 14
  • 15. Quiz 1. A process is ____________ if it cannot affect or be affected by the other processes executing in the system a) Independent b) Dependent c) Cooperating 9CM402.14 15
  • 16. Quiz 2. A process is ________ if it can affect or be affected by other processes executing in the system. a) Cooperating b) Independent c) Dependent 9CM402.14 16
  • 17. Quiz 3. A process that does not share any data with any other process is a)Independent Process b) Cooperating c) Dependent 9CM402.14 17
  • 18. Other subject materials • Web designing • Micro processors • C++ tutorials • java home