In: Computer Science
Network Security: A process can be in one of three states:
running,
ready, and blocked. A job is a kind of process
and can be in one of three states: foreground, background, and
paused.
What’s the similarity between the three process states and the
three job states?
Hint: It’s not a one-to-one mapping.
Ready
In the ready state the process will be waiting so that it gets
assigned to the processor by the short term scheduler, so that it
can run. This state comes just after the new state for the
process.
Running
The process is in the running state when the process instructions
will be executed by the processor. This will be done when the
process is assigned to the processor using the short-term
scheduler.
Blocked
The process will be in blocked state if it is waiting for some
event to occur. This event can be I/O because the I/O events are
executed in the main memory and it does not require the processor.
After the event is completed then the process again will go to
ready state.
Foreground: When we enter to a command in the terminal window,
then the command would occupy that terminal window until it gets
completed. This is a foreground job.
2. Background: When you enter to an ampersand ie.,(&) symbol at
the end of the command line, then the command would run without
occupying the terminal window. The shell prompt will be displayed
immediately after we press Return. This is example of a background
job.
PAUSE PROCESS would suspends the execution of the process until it have been reactivated by the RESUME PROCESS command. In this period, the process does not take any time on the machine or the system . If the process is been paused, the process will be still in the memory. If process is been already paused, then PAUSE PROCESS does nothing.
A process will be program which is under execution.
The concept of this jobs is that its the
combination of one or more
processes.
And answer to the question
specifically is :
As I said a there could be multiple
process in a job, So if a job is in the
foreground or background state,
we can't guarantee that all the
process in it are in the running
state, they may be in running,
ready or the blocked state.
But if a job is in the paused state,
then we could be sure that all the
process in it would be either in ready
and the blocked state.
As this is not a one to one
mapping.