Process in Operating System Last Updated : 30 Dec, 2024 Summarize Comments Improve Suggest changes Share Like Article Like Report 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). .How Does a Process Look Like in Memory? A process in memory is divided into several distinct sections, each serving a different purpose. Here's how a process typically looks in memory:Text Section: A text or code segment contains executable instructions. It is typically a read only sectionStack: The stack contains temporary data, such as function parameters, returns addresses, and local variables. Data Section: Contains the global variable. Heap Section: Dynamically memory allocated to process during its run time.Attributes of a ProcessA process has several important attributes that help the operating system manage and control it. These attributes are stored in a structure called the Process Control Block (PCB) (sometimes called a task control block). The PCB keeps all the key information about the process, including:Process ID (PID): A unique number assigned to each process so the operating system can identify it.Process State: This shows the current status of the process, like whether it is running, waiting, or ready to execute.Priority and other CPU Scheduling Information: Data that helps the operating system decide which process should run next, like priority levels and pointers to scheduling queues.I/O Information: Information about input/output devices the process is using.File Descriptors: Information about open files files and network connections.Accounting Information: Tracks how long the process has run, the amount of CPU time used, and other resource usage data.Memory Management Information: Details about the memory space allocated to the process, including where it is loaded in memory and the structure of its memory layout (stack, heap, etc.).These attributes in the PCB help the operating system control, schedule, and manage each process effectively.States of ProcessA process is in one of the following states: New: Newly Created Process (or) being-created process.Ready: After the creation process moves to the Ready state, i.e. the process is ready for execution.Running: Currently running process in CPU (only one process at a time can be under execution in a single processor).Wait (or Block): When a process requests I/O access.Complete (or Terminated): The process completed its execution.Suspended Ready: When the ready queue becomes full, some processes are moved to a suspended ready stateSuspended Block: When the waiting queue becomes full.Please refer States of a Process for more details. Comment More infoAdvertise with us Next Article Operating System Services K kartik Follow Improve Article Tags : Operating Systems Process Management Similar Reads Multi Processing Operating System The operating system functions like a manager of all the available resources. Therefore operating system is defined as an interface between the system and the user. There are various types of operating systems such as Batch Operating Systems, Multi-programming Operating Systems, distributed operatin 4 min read Batch Processing Operating System In the beginning, computers were very large types of machinery that ran from a console table. In all-purpose, card readers or tape drivers were used for input, and punch cards, tape drives, and line printers were used for output. Operators had no direct interface with the system, and job implementat 6 min read Process Schedulers in Operating System A process is the instance of a computer program in execution. Scheduling is important in operating systems with multiprogramming as multiple processes might be eligible for running at a time.One of the key responsibilities of an Operating System (OS) is to decide which programs will execute on the C 7 min read Cooperating Process in Operating System Pre-requisites: Process Synchronization In an operating system, everything is around the process. How the process goes through several different states. So in this article, we are going to discuss one type of process called as Cooperating Process. In the operating system there are two types of proce 2 min read Operating System Services An operating system is software that acts as an intermediary between the user and computer hardware. It is a program with the help of which we are able to run various applications. It is the one program that is running all the time. Every computer must have an operating system to smoothly execute ot 6 min read System Programs in Operating System System Programming can be defined as the act of building Systems Software using System Programming Languages. According to Computer Hierarchy, Hardware comes first then is Operating System, System Programs, and finally Application Programs.In the context of an operating system, system programs are n 5 min read Like