Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

Introduction of Process Management

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article
 

Program vs Process: A process is a program in execution. For example, when we write a program in C or C++ and compile it, the compiler creates binary code. The original code and binary code are both programs. When we actually run the binary code, it becomes a process. 

A process is an ‘active’ entity instead of a program, which is considered a ‘passive’ entity. A single program can create many processes when run multiple times; for example, when we open a .exe or binary file multiple times, multiple instances begin (multiple processes are created). 

Process management refers to the techniques and strategies used by organizations to design, monitor, and control their business processes to achieve their goals efficiently and effectively. It involves identifying the steps involved in completing a task, assessing the resources required for each step, and determining the best way to execute the task.

Process management can help organizations improve their operational efficiency, reduce costs, increase customer satisfaction, and maintain compliance with regulatory requirements. It involves analyzing the performance of existing processes, identifying bottlenecks, and making changes to optimize the process flow.

Process management includes various tools and techniques such as process mapping, process analysis, process improvement, process automation, and process control. By applying these tools and techniques, organizations can streamline their processes, eliminate waste, and improve productivity.

Overall, process management is a critical aspect of modern business operations and can help organizations achieve their goals and stay competitive in today’s rapidly changing marketplace.

Process Management  

If operating system supports multiple users than services under this are very important . In this regard operating systems has to keep track of all the completing processes , Schedule them, dispatch them one after another. But user should feel that he has the full control of the CPU.

some of the systems calls in this category are as follows.

  1.  create a child process  identical to the parent.
  2.  Terminate a process
  3.  Wait for a child process to terminate
  4.  Change the priority of process
  5.  Block the process
  6.  Ready the process
  7.  Dispatch a process
  8.  Suspend a process
  9.  Resume a process
  10.  Delay a process
  11. Fork a process

What does a process look like in memory? 

process

  • Text Section: A Process, sometimes known as the Text Section, also includes the current activity represented by the value of the Program Counter. 
  • Stack: The stack contains temporary data, such as function parameters, returns addresses, and local variables. 
  • Data Section: Contains the global variable. 
  • Heap Section: Dynamically allocated memory to process during its run time. 

Refer to this for more details on sections. 

Attributes or Characteristics of a Process: A process has the following attributes.

1. Process Id:    A unique identifier assigned by the operating system
2. Process State: Can be ready, running, etc.
3. CPU registers: Like the Program Counter (CPU registers must be saved and 
                  restored when a process is swapped in and out of CPU)
4. Accounts information: Amount of CPU used for process execution, time limits, execution ID etc
5. I/O status information: For example, devices allocated to the process, 
                           open files, etc
6. CPU scheduling information: For example, Priority (Different processes 
                               may have different priorities, for example
                               a shorter process assigned high priority
                               in the shortest job first scheduling)

All of the above attributes of a process are also known as the context of the process. Every process has its own process control block(PCB), i.e each process will have a unique PCB. All of the above attributes are part of the PCB. 

States of Process: A process is in one of the following states: 

1. New: Newly Created Process (or) being-created process.

2. Ready: After creation process moves to Ready state, i.e. the 
          process is ready for execution.

3. Run: Currently running process in CPU (only one process at
        a time can be under execution in a single processor).

4. Wait (or Block): When a process requests I/O access.

5. Complete (or Terminated): The process completed its execution.

6. Suspended Ready: When the ready queue becomes full, some processes 
                    are moved to suspended ready state

7. Suspended Block: When waiting queue becomes full.

process-states

Context Switching: The process of saving the context of one process and loading the context of another process is known as Context Switching. In simple terms, it is like loading and unloading the process from the running state to the ready state. 

When does context switching happen? 
1. When a high-priority process comes to a ready state (i.e. with higher priority than the running process) 
2. An Interrupt occurs 
3. User and kernel-mode switch (It is not necessary though) 
4. Preemptive CPU scheduling used. 

Context Switch vs Mode Switch: A mode switch occurs when the CPU privilege level is changed, for example when a system call is made or a fault occurs. The kernel works in more a privileged mode than a standard user task. If a user process wants to access things that are only accessible to the kernel, a mode switch must occur. The currently executing process need not be changed during a mode switch. 

A mode switch typically occurs for a process context switch to occur. Only the kernel can cause a context switch. 

CPU-Bound vs I/O-Bound Processes: A CPU-bound process requires more CPU time or spends more time in the running state. 
An I/O-bound process requires more I/O time and less CPU time. An I/O-bound process spends more time in the waiting state. 

Exercise: 

1. Which of the following need not necessarily be saved on a context switch between processes? (GATE-CS-2000) 
(A) General purpose registers 
(B) Translation lookaside buffer 
(C) Program counter 
(D) All of the above 

Answer (B) 

Explanation: In a process context switch, the state of the first process must be saved somehow, so that when the scheduler gets back to the execution of the first process, it can restore this state and continue. The state of the process includes all the registers that the process may be using, especially the program counter, plus any other operating system-specific data that may be necessary. A translation look-aside buffer (TLB) is a CPU cache that memory management hardware uses to improve virtual address translation speed. A TLB has a fixed number of slots that contain page table entries, which map virtual addresses to physical addresses. On a context switch, some TLB entries can become invalid, since the virtual-to-physical mapping is different. The simplest strategy to deal with this is to completely flush the TLB. 

2. The time taken to switch between user and kernel modes of execution is t1 while the time taken to switch between two processes is t2. Which of the following is TRUE? (GATE-CS-2011) 

(A) t1 > t2 
(B) t1 = t2 
(C) t1 < t2 
(D) nothing can be said about the relation between t1 and t2. 

Answer: (C) 

Explanation: Process switching involves a mode switch. Context switching can occur only in kernel mode. 

 

Advantages of Process Management:

Improved Efficiency: Process management can help organizations identify bottlenecks and inefficiencies in their processes, allowing them to make changes to streamline workflows and increase productivity.
Cost Savings: By identifying and eliminating waste and inefficiencies, process management can help organizations reduce costs associated with their business operations.
Improved Quality: Process management can help organizations improve the quality of their products or services by standardizing processes and reducing errors.
Increased Customer Satisfaction: By improving efficiency and quality, process management can enhance the customer experience and increase satisfaction.
Compliance with Regulations: Process management can help organizations comply with regulatory requirements by ensuring that processes are properly documented, controlled, and monitored.

Disadvantages of Process Management:

  1. Time and Resource Intensive: Implementing and maintaining process management initiatives can be time-consuming and require significant resources.
  2. Resistance to Change: Some employees may resist changes to established processes, which can slow down or hinder the implementation of process management initiatives.
  3. Overemphasis on Process: Overemphasis on process can lead to a lack of focus on customer needs and other important aspects of business operations.
  4. Risk of Standardization: Standardizing processes too much can limit flexibility and creativity, potentially stifling innovation.
  5. Difficulty in Measuring Results: Measuring the effectiveness of process management initiatives can be difficult, making it challenging to determine their impact on organizational performance.

    Quiz on Process Management 

Please write comments if you find anything incorrect or if you want to share more information about the topic discussed above. 


My Personal Notes arrow_drop_up
Last Updated : 24 Apr, 2023
Like Article
Save Article
Similar Reads