0% found this document useful (0 votes)
504 views18 pages

Cooperative Process: Prepared & Presented By: Abdul Rehman & Muddassar Ali

Uploaded by

Seño Rita
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
504 views18 pages

Cooperative Process: Prepared & Presented By: Abdul Rehman & Muddassar Ali

Uploaded by

Seño Rita
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

Cooperative Process

Prepared & Presented by:

Abdul Rehman
&
Muddassar Ali
Contents:
1. Definition
2. Types
3. Reasons for Need of Cooperating Processes
4. Methods
5. Advantages
6. Disadvantages
Definition:
Sharing a job among two or more computers such as a
mainframe and a PC. It implies splitting the workload
for the most efficiency. 
Types:
1. Independent Process
2. Cooperating Process
Independent Process:
A process is said to be independent when it cannot
affect or be affected by any other processes that are
running the system.
It is clear that any process which does not share any
data (temporary or persistent) with any another
process then the process is independent.
Cooperating Process:
A cooperating process is one which can affect or
affected by any another process that is running on the
computer.
The cooperating process is one which shares data with
another process.
Reasons for Need of Cooperating Processes:

1. Information sharing
2. Computation speedup
3. Modularity
4. Convenience
Information sharing:

In the information sharing at the same time, many


users may want the same piece of information(for
instance, a shared file) and we try to provide that
environment in which the users are allowed to
concurrent access to these types of resources.
Computation speedup:
When we want a task that our process run faster so we
break it into a subtask, and each subtask will be
executing in parallel with another one. It is noticed
that the speedup can be achieved only if the computer
has multiple processing elements (such as CPUs or I/O
channels).
Modularity:

In the modularity, we are trying to construct the


system in such a modular fashion, in which the system
dividing its functions into separate processes.
Convenience:

An individual user may have many tasks to perform at


the same time and the user is able to do his work like
editing, printing and compiling.
Methods of Cooperation:

1. Cooperation by Sharing
2. Cooperation by Communication
Cooperation by Sharing:
The cooperating processes can cooperate with each
other using shared data such as memory, variables,
files, databases etc. Critical section is used to provide
data integrity and writing is mutually exclusive to
prevent inconsistent data.

A diagram that demonstrates


cooperation by sharing is given
as follows:
Cooperation by Sharing: (Cont.)

In the diagram, Process P1 and


P2 can cooperate with each
other using shared data such as
memory, variables, files,
databases etc
Cooperation by Communication:
The cooperating processes can cooperate with each
other using messages. This may lead to deadlock if
each process is waiting for a message from the other to
perform a operation. Starvation is also possible if a
process never receives a message.

A diagram that demonstrates cooperation by


communication is given as follows −
Cooperation by Communication: (Cont.)

the above diagram, Process P1 and P2


can cooperate with each other
using messages to communicate.
Advantages:
There are many tasks that a user needs to do such as
compiling, printing, editing etc. It is convenient if
these tasks can be managed by cooperating
processes.
Subtasks of a single task can be performed parallely
using cooperating processes.
 This increases the computation speedup as the task
can be executed faster.
Concurrent access to the resources.
Time Saving.
Disadvantages:
 It is difficult to stop a task once it has started.

 It does not guarantee that every task will be able to


access the processor.

  It does not work well for certain response times.

You might also like