Professional Documents
Culture Documents
Process Concept
Process States and Transitions
Operations on Processes
Implementation of Processes
Cooperating Processes
Threads
User process
Tells OS to create New
System process invoked from I/O
Process and indicate,
A batch manager process
directly or indirectly,
Which program to run on
it
)
Return: TRUE only if the process and thread are successfully created.
ExitProcess Windows
Dividing by zero
TerminateProcessWindows
Exit
enter Not running
running
Pause
Transition 2– occurs when the scheduler decides time allotted for the process is
expired
This state transition is:
Time-Run-Out(process Name): RunningReady
Transition 3 -occurs when all other process have had their share and it is time for
the first process to run again
This state transition is :
Dispatch(process Name): ReadyRunning
thread.join(int millisecs)
Blocks the calling thread for up to the specified time until thread has terminated.
thread.interrupt()
Interrupts thread: causes it to return from a blocking method call such as sleep().
object.wait(long millisecs, int nanosecs)
Blocks the calling thread until a call made to notify() or notifyAll() on object wakes
the thread, or the thread is interrupted, or the specified time has elapsed.
object.notify(), object.notifyAll()
Wakes, respectively, one or all of any threads that have called wait() on object.
pcb
Service
Service call
call Job n Job n Job n
from
handler CD ROM/DVD
process
(code) …. … ….
Other
Interru
pt HW
registers …. Instructi Job 1
on 1
PSW
Add n …. .. Job n-x
PC
Running
Job n Terminals
…. Job 2
Interrupt Interrupt Job 2 ….
from handler Add 1 Job 1
Process (code) Job 1 Job 1
Interrupt
from I/O Long
Interrupt Short
Vector
Term
Term Job n USB
Queues
Queues
Short term
…
scheduler Job 1
Contains address
(code)
of interrupt
service procedure I/O queues
Pass Control to process