Operating System Process Management

During the olden days, computer systems allowed only one program to be executed at one time. This is why that program had complete power of the system and had access to all or most of the system's resources. In contrast, nowadays, current-day computer systems let multiple programs to be loaded into memory and execute them concurrently. This massive change and development required rigid control and more compartmentalization in various programs.

The more fused or complex the operating system is, the more it is expected to do on behalf of its users. Even though its main concern is the execution of user programs, it also requires taking care of various system tasks which are better left outside the kernel itself. So a system must consist of a set of processes: operating system processes, executing different system code and user processes which will be executing user code. In this chapter, you will learn about the processes that are being used and managed by the operating system.

What are the processes?

A process is mainly a program in execution where the execution of a process must progress in sequential order or based on some priority or algorithms. In other words, it is an entity that represents the fundamental working that has been assigned to a system.

When a program gets loaded into the memory, it is said to as a process. This processing can be categorized into four sections. These are:

  • Heap
  • Stack
  • Data
  • Text

Process Concept

There's a question which arises while discussing operating systems that involves when to call all the activities of the CPU. Even on a single-user operating system like Microsoft Windows, a user may be capable of running more than a few programs at one time like MS Word processor, different web browser(s) and an e-mail messenger. Even when the user can execute only one program at a time, the operating system might require maintaining its internal programmed activities like memory management. In these respects, all such activities are similar, so we call all of them as 'processes.'

Again another term - "job" and process are used roughly replacing each other. Much of the operating - system theory and terminology was developed during a time when the main action of operating systems was job processing; so the term job became famous gradually. It would be confusing to avoid the use of commonly accepted terms which include the word job like 'job scheduling.'

Process state of Operating System

As a process executes, it changes state. The state of a process is defined in part by the current activity of that process. Each process may be in one of the following states:

  • New: In this state, the process is being created.
  • Running: In this state, instructions are being executed.
  • Waiting: In this state, the process is waiting for the different event to occur like I/O completion or treatment of a signal.
  • Ready: In this state, the process waits to assign a processor.
  • Terminated: In this state, the process has finished executing.

Subscribe Updates via Email

Join 49,000+ W3schools lovers and get all the latest tutorials, programs, algorithms in your inbox.