Position:Home>JAVA Development> JAVA tutorial: The multi-line Cheng mechanism of analytic Java
JAVA tutorial: The multi-line Cheng mechanism of analytic Java
From;  Author:Stand originally

  
Morpheus condition: The Morpheus time that Sleep method can be called in online Cheng moving process and appoints line Cheng in methodological parameter is transition of line Cheng state Morpheus condition. At this moment, this line Cheng is not being released take up stop to run designation Morpheus time below the circumstance of resource. After time arrives, line Cheng is attempered by JVM line Cheng afresh implement undertake attemper and administrative.
  
Hang condition: Can be through calling Suspend method to change the position of line Cheng hang condition. At this moment, line Cheng will release all resource that take up, attemper by JVM turn to store temporarily space, till applied process calls Cheng of multiple track of Resume method extensive,move.
  
Dead condition: Cheng of the line after the Stop method that moves to end or call line Cheng boy or girl friend when line Cheng body will be stopped move, receive the resource that loop-line Cheng takes up by JVM.
  
In Java line Cheng kind in defined corresponding method respectively, in be being used at using a program, to line Cheng condition undertakes control and administrative.
  
Of line Cheng attemper
  
What the sense that line Cheng calls depends on JVM answering the many lines Cheng that move to have systematic class is harmonious, cheng Zheng uses finite resource and bring about applied system dead plane in order to shun many lines to perhaps break down.
  
Distinguish to the importance of operating system and user for line Cheng, java defined the first step strategy of line Cheng. Java is the first step cent of line Cheng 10 grade, express with the number between 1-10 respectively. The number shows the level of line Cheng is higher greatly more. Accordingly, in Thread kind in defined state the line is Cheng lowest, top the member variable MIN_PRIORITY with common and first step, MAX_PRIORITY and NORMAL_PRIORITY, first step grade of the representing is respectively 1, 10 with 5. When object of Cheng of a line is founded, its acquiescent line Cheng first step is 5.
  
For the moving strategy of control line Cheng, java defined line Cheng to attemper implement come all line Cheng that condition of be in order is in in supervisory system. Line Cheng attempers implement decide according to the first step of line Cheng that line Cheng throws processor to move. Below the condition that is in condition of be in order in many lines Cheng, cheng meets the line that has fast first step get executive before Cheng of line of small first step. Line Cheng attempers implement use strategy of " of type of " race to control to attemper likewise line Cheng is carried out, the line Cheng that there is faster first step in carrying out a process when front Cheng namely enters state of be in order, the line Cheng of fast first step is attempered to carry out instantly. The kind that has all line Cheng of identical and first step to use cycle will allot CPU time jointly piece.
Previous 1 2 3 4 5 67 8 Next