WHAT IS RUNNING STATE?

No comments

Running  state :     Running  means   that  the  processor  has  given  it’s  time  to  the  thread  for  its  execution.  The  thread  runs  until  if  relinquishes  control  on  its  own   or  it  is  primitive  by  a  higher  priority  thread.  A  running  thread  may  relinquish  its  control  in  one  of  the  following  situation.

a.    It  has  been  suspended  using  suspend()  a  suspended  thread  can  be  revived  by  using  the  resume()  method.  This  approach  is  useful  when  we  want  to  suspend  a  thread  for  some  time  due  to  carton   resume  but  don’t  to  kill  it.

b.     It  has  been  made  to  sleep.  We  can  put  a  thread  to  sleep  for  a  specifying  time  period  using  the  method(time)  where  time  is  an  milliseconds  this  means  that  the  thread  is  out  the  queue  during  the  time  period.

c.     It  has  been  told  to  wait  until  same  even   occur.  This  is  done  using  the  wait  method.  The  thread  can  be  scheduling  to  run  again  using  the  notify()  method.

No comments :

Post a Comment

Subscribe

Milan Panda
Admin
About Me | Contact
Copyright 2023-2024 © Programming1011 . 🎀 Developed and Design By- Milan Panda. Happy Holi All Of You 🎀