1. Process and Threads in JAVA
The complete
Explanation
On
Process and Threds
By
Rahul Tamrkar
Facebook profile
rahultamrkar91@gmail.com
2. Process
A process is like a programm in execution. A process
is defined as entity which represents the basic unit of work to be
implemented in the system.
The components of process:-
* Object of programm
* Data
* Resources
* Status
3. Process and programm
A programm by it self is not a process. Programm contains only
instructions to be executed only by processor.
Class Programm_Exapmle
{
int i;
public void m1( )
{
Statements……..
}
}
Programm ‘ Programm_Exapmle’
conatains only instruction like what
m1 method show to the users.
4. Process State
As a process excecute , it changes the state. It can
have 5 states at a time.
The states of process:-
* New :- The process is being created.
* Ready :- InReadystate, theprocessiswaitting tobeassigned to a
processor(theprocessarewaitting tohavethe processor
allocated tothembytheoperatingsystem,
sothattheycanrun.).
*Running:-Processinstruction thatprogrammcontainsarebeing
executed.
5. Process state
•Waitting :- Process is waitting for some events to occurs.
* Terminated :- The process has finished the execution.
Suppose , in our programm we need to take input by
user then we need to use IO package . That time
Input / output events occure.