Summary


A process is a program in execution. During the process execution, it changes its state. The process state can be new, ready, running, waiting, or terminated. The process-control block represents each process in the operating system. The operating system keeps the non-executing processes in I/O request queues and the ready queue. The operating system does two types of scheduling: long-term and short-term. The long-term scheduler selects the processes from the secondary storages. The short-term selects one the ready processes to be executed in CPU. There are different types that allow running processes to communicate with each other such as message-passing systems, direct and indirect communication.

Modern operating system supports multithreading in which multiple concurrent threads may be defined within a single process. Multithreading can be done using user-level threads or kernel-level threads. User-level threads are efficient because there is no mode switch from one thread to another. However, only a single user-level thread within a process can execute at a time. In addition, it has the disadvantage that if one thread blocks, the entire process is blocked. Kernel-level threads are threads within a process that are managed by the kernel. In kernel-level threads, multiple threads within the same process can execute in parallel on a multiprocessor. It has the advantage that the blocking of a thread does not block the entire process.