Issues of Concurrency
- Non-atomic: Operations that are non-atomic but interruptible by multiple processes can cause problems.
- Race conditions: A race condition occurs of the outcome depends on which of several processes gets to a point first.
- Blocking: Processes can block waiting for resources. A process could be blocked for long period of time waiting for input from a terminal. If the process is required to periodically update some data, this would be very undesirable.
- Starvation: It occurs when a process does not obtain service to progress.
- Deadlock: It occurs when two processes are blocked and hence neither can proceed to execute.
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
Contact Us