Relationship Between Processes of Operating System
The Processes executing in the operating system is one of the following two types:
- Independent Processes
- Cooperating Processes
Independent Processes
Its state is not shared with any other process.
- The result of execution depends only on the input state.
- The result of the execution will always be the same for the same input.
- The termination of the independent process will not terminate any other.
Cooperating System
Its state is shared along other processes.
- The result of the execution depends on relative execution sequence and cannot be predicted in advanced(Non-deterministic).
- The result of the execution will not always be the same for the same input.
- The termination of the cooperating process may affect other process.
Concurrency in Operating System
Concurrency is the execution of multiple instruction sequences at the same time. It happens in the operating system when there are several process threads running in parallel. The running process threads always communicate with each other through shared memory or message passing. Concurrency results in the sharing of resources resulting in problems like deadlocks and resource starvation.
It helps in techniques like coordinating the execution of processes, memory allocation, and execution scheduling for maximizing throughput.
There are several motivations for allowing concurrent execution
- Physical resource Sharing: Multiuser environment since hardware resources are limited
- Logical resource Sharing: Shared file (same piece of information)
- Computation Speedup: Parallel execution
- Modularity: Divide system functions into separation processes