OS process

The process is actually a system in use. The process should proceed in a sequential manner. Process is defined as a business that represents the basic category of work to be used in the system.

To put it simply, we write our computer programs into a text file and when we do this program, it becomes a process that performs all the functions specified in this program. 

When a program is loaded into memory and processed, it can be divided into four categories, stack, bulk, text and data. 
The following image shows the simplified structure of the process within a large memory -

1. Stack

Stack Process contains temporary data such as method / operation parameters, return address and location variations.

2. Bulk

This is a powerful memory in the process during its operation.

3. Text

This includes the current function represented by the Counter value of the program and the content of the processor registers.

4. Data

This section contains earthy and structural variables.

The program 

A program is a piece of code that can be one line or millions of lines. A computer program is usually written by a computer programmer in the language of the program. For example, here's a simple program written in C-programming language -

A computer program is a set of commands that perform a specific function of a computer. If we compare system with process, we can conclude that process is a powerful form of computer programming.

The part of a computer program that performs a well-defined task is known as an algorithm. A collection of computer programs, libraries and related information is referred to as software.

Life Cycle Cycle

When the process is running, it passes through different regions. These categories may vary from one program to another, and the names of these provinces may also be different.

Generally, the process can be one of the following five at a time:

1. Get started

This is the first situation where the process starts / is created first.

2. Ready

The process is waiting to be processed by the processor. The correct processes are waiting for the processor to be assigned an application so that they can work. The process can go into this state after the Start mode or while running it but is interrupted by the editor to give the CPU another process.

3. Running

When a process is provided by a processor by the OS editor, the process mode is set to work and the processor uses its own commands.

4. Waiting

The process goes into standby if it needs to wait for an application, such as waiting for user input, or waiting for a file to be found.

5. Disconnected or Exit

When the process has completed its execution, or is terminated by the application, it is moved away from where it expects to be removed from the main memory.

Process Prevention Process (PCB)

Process Control Block is a data structure maintained by the Operating System throughout the process. The PCB is identified by a unique numeric ID (PID). 

The PCB stores all the information needed to keep track of the process as listed below in the table -

Details & Description

1. Provincial Procedure

The current state of the process i.e., whether it is ready, active, waiting, or whatever.

2. Procedures

This is required to enable / disable access to system resources.

3. Process ID

Different identification of each process in the application.

4. Identifier

Identification of parental process.

5. Calculation System

The Accounting System is the address bar for the next command to be executed through this process.

6. CPU registers

Various CPUs register when a process needs to be maintained in order to be used in an active mode.

7. CPU Configuration Details

Processed process and other planning information needed to plan the process.

8. Memory management information

This includes page table details, memory limits, Category table depending on the memory used by the operating system.

9. Accounting Details

This includes the amount of CPU used to process, time limits, ID of performance etc.

10. Details of IO status

This includes a list of I / O devices assigned to the process.

The construction of a PCB depends entirely on the Operating System and may contain different details for different operating systems. Here's a simple PCB drawing -

The PCB is stored in the process for the rest of its life, and is removed when the process is complete.

All Topics of OS.