Toya has a masters of computer science in computer science and has taught college students as an adjunct instructor.
The execution of processes within a computer cannot happen if there's no communication between the components. There are several components within a computer that help to ensure the success of each task, including the central processing unit (CPU), memory, and input/output (I/O) devices.
In today's computers, multiple processes are executed concurrently through the CPU. The operating system (OS) helps to manage the tasks the CPU needs to process by allotting CPU time to each request. This situation is similar to scheduling an appointment with your doctor. First, you call and make the appointment. On the day of your appointment, you sit in the waiting room. After you see your doctor, you leave. A similar sequence of events happens with the CPU. The OS receives a request for a task and schedules a time for the task to be released for CPU processing. When the CPU is ready for the task, it's executed and completed. The CPU then moves on to process the next task.
Types of Processes
There are two types of cooperative processes: independent and cooperating. Independent processes work independently of themselves. They do not affect and cannot be affected by other processes that are running within the operating system, nor do they share data with any processes or systems.
Cooperating processes can be affected by other processes and, in turn, affect other processes within the operating system. These processes share their data with other processes and systems.
There are several reasons for data to be shared within a computer system. For example, if two processes need to access the same file, one process will write to the file, while the other process reads from the file. Thus, each process could be affected by what the other does. Process cooperation can be broken down into four categories:
- Information sharing
- Computation speed-up
Information sharing involves the exchange of information between multiple processes. For example, in terms of multi-user access to the same file, there must be a system in place that allows these users to access the file parallel to each other without running into system problems or errors.
In terms of computation speed-up, a system can process multiple tasks more quickly if it's broken down into smaller parts, which can then be executed simultaneously. This will in turn speed up the computation process and allow the task to be completed faster. One example of this would be a mathematical order of operations equation: parentheses, exponents, multiplication/division, and addition/subtraction (or a PEMDAS equation). The best way to solve these types of equations is to break it down into smaller parts and solve each part individually.
Modularity involves breaking down complex tasks into smaller tasks to be completed by different processes. For instance, if you've been assigned a complex project that's too big for one person to complete, the easiest way to complete the project would be to assign different portions of the project to different staff members.
Convenience is the synchronization of multiple processes running at once without causing conflicts when a user is multitasking. For example, if a user is composing and printing a document while opening an internet browser, these tasks can be done simultaneously and the user does not have to wait to complete one task before starting another.
One example that's often used to explain cooperating processes is the producer-consumer cooperation problem, where the producer process develops data that's consumed by the consumer process. This, however, cannot be done unless there's a shared buffer between both processes, allowing each to run concurrently. As the producer writes the data, the consumer will read it. The problem lies in the fact that the producer process should not try to add data to the buffer if it's full and a consumer process should not try and remove data from the buffer if it's empty.
Let's review. The operating system (OS) helps to manage the tasks the CPU needs to process by allotting CPU time to each request. There are two types of cooperative processes: independent and cooperating. Independent processes do not affect and cannot be affected by other processes that are running within the operating system, nor do they share data with any processes or systems. Cooperating processes can be affected by other processes and, in turn, affect other processes within the operating system. Advantages and categories of cooperative processing include information sharing, computation speed-up, modularity, and convenience. The cooperating process can be explained by the consumer-producer cooperation problem, whereby the producer process should not try to add data to the buffer if it's full, and the consumer process should not try and remove data from the buffer if it's empty.
To unlock this lesson you must be a Study.com Member.
Create your account
Register to view this lesson
Unlock Your Education
See for yourself why 30 million people use Study.com
Become a Study.com member and start learning now.Become a Member
Already a member? Log InBack