Concurrency in Operating System with Its principle

Concurrency in Operating System refers to the execution of several programs at the same time. It takes place in OS when multiple processes are executing in parallel. It is the execution of processes to provide an impression of a synchronous computation.

In Concurrency, resources are shared among the processes that result in troubles such as starvation and deadlocks. It supports mechanisms like memory allocation, execution of processes, and computation scheduling to maximise throughput. 

Principles of Concurrency

There are two types of concurrent processes with similar troubles- Overlapping and interleaved processes. It is not possible to forecast the relative speed of execution, and the given points determine it:

  • The operating system’s scheduling policy.
  • The activity of other processes.
  • The way of handling interrupts by the operating system. 

Problems in Concurrency

  • It is troublesome to sharing of global resources carefully.
  • The management of the allocation of resources is very difficult for the operating system.
  • Identifying programming errors are very difficult due to reports are generally unreproducible. 
  • It may be incapable to simply lock the channel by the operating system. 

Advantages of Concurrency

  • It allows running many applications at the same time.
  • It allows for the better functioning of the operating system.
  • It provides a better average response time.
  • It allows that when resources are not in use by one application, they can be used by other applications.