Java thread: thread stack model and thread variable Scjp5 Study NotesTo understand the Thread Scheduling Principle and the thread execution process, you must understand the thread stack model. The thread stack refers to the stack information of Thread Scheduling in the memory at a certain time point. The method currently called is always at the top of the stack. The content of the thread stack is
ProgramTherefore, to study the thread stack, You must select a runtime (actually
Code). The following uses an exemplary code to explain the change process of the thread (CALL) stack. This figure describes the Virtual Machine thread call stack when the code is executed at two different times: 1 and 2. When the program runs to T. Start ();, the program has an extra Branch (with a call stack B added). In this way, stack a and stack B are executed in parallel. Here we can see the difference between method calling and thread startup.
From http://lavasoft.blog.51cto.com/62575/99152