During the olden days, computer systems allowed only one program to be executed simultaneously. This is why that program had complete power and access to all or most of the system's resources. In contrast, current computer systems let multiple programs be loaded into memory and executed 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 executing user programs, it also requires handling 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 codes, and user processes that will be running user code. In this tutorial, you will learn about the processes 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 work assigned to a system.
When a program gets loaded into the memory, it is a process. This processing can be categorized into four sections. These are:
A question that arises while discussing operating systems 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 simultaneously, like an 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 be required to maintain its internal programmed activities like memory management. In these respects, all such activities are similar, so we call them 'processes.'
Again, another term - "job" and process are used roughly, replacing each other. Much of the operating - system theory and terminology was developed when the main action of operating systems was job processing, so the term job became famous gradually. It would be confusing to avoid using commonly accepted terms, including 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 different events 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.