0% found this document useful (0 votes)
30 views7 pages

1 Process Concepts, States

A process is an executing program that includes the program code, current activity, process stack, data section, and potentially a heap. Processes transition through various states: New, Ready, Running, Waiting, and Terminated, with multiprogramming allowing multiple processes to share CPU time. The operating system manages these states and transitions to ensure efficient execution of processes.

Uploaded by

theerthasjoy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views7 pages

1 Process Concepts, States

A process is an executing program that includes the program code, current activity, process stack, data section, and potentially a heap. Processes transition through various states: New, Ready, Running, Waiting, and Terminated, with multiprogramming allowing multiple processes to share CPU time. The operating system manages these states and transitions to ensure efficient execution of processes.

Uploaded by

theerthasjoy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Processes

Processes

A process is a program in execution.


A process is just an instance of an executing program,
including the current values of the program counter, registers,
and variables.
Conceptually, each process has its own virtual CPU.
In reality, the real CPU switches back and forth from process
to process.
This rapid switching back and forth is called
multiprogramming.
Process

A process has the program code, which is


known as the text section.
Process also includes the current activity, as
represented by the value of the program
counter and the contents of the processor’s
registers.
A process generally also includes the process
stack, which contains temporary data (such
as function parameters, return addresses, and
local variables), Data section, which contains
global variables.
A process may also include a heap, which is
memory that is dynamically allocated during
process run time.
Process Model

a) Multiprogramming of four programs.


(b) Conceptual model of four independent, sequential processes.
(c) Only one program is active at once
Process States
New : The process is being created.
Running: Instructions are being executed.
Waiting : The process is waiting for some event to occur (such
as an I/O completion or reception of a signal).
Ready : The process is waiting to be assigned to a processor.
Terminated : The process has finished execution.
Process States
A Five-State Model
 New
 Running
 Waiting(Blocked)
 Ready
 Terminated(Exit)

1.Start/ New
This is the initial state when a process is first started/created.
2 Ready
The process is waiting to be assigned to a processor. Ready processes are
waiting to have the processor allocated to them by the operating system so that
they can run. Process may come into this state after Start state or while running
it, but interrupted by the scheduler to assign CPU to some other process
Process States
3 Running
 Once the process has been assigned to a processor by the OS scheduler,
the process state is set to running and the processor executes its
instructions.
4 Waiting
 Process moves into the waiting state if it needs to wait for a resource,
such as waiting for user input, or waiting for a file to become available.
5 Terminated or Exit
 Once the process finishes its execution, or it is terminated by the
operating system, it is moved to the terminated state.

You might also like