Mechanism for obtaining a thread from, and returning a thread to, a thread pool without attaching and detaching

   
   

A JAVA application is typically executed as follows. First, a thread from a thread pool is attached to the JAVA virtual machine (JVM). Then, that thread is used to execute the JAVA application. Once the execution of the JAVA application is completed, the thread is detached from the JVM and returned to the thread pool. This is repeated for every execution of a JAVA application. Because this constant attaching and detaching of threads imposes additional overhead on the system, this process is inefficient. To improve the efficiency of the execution process, a "sticky attach" mechanism is provided. With sticky attach, a thread is not attached and detached from the JVM each time a JAVA application is executed. Rather, a thread is attached to the JVM only once: the first time it is used to execute a JAVA application. When execution of the JAVA application is completed, the thread is returned to the thread pool without detaching from the JVM. That way, the next time that thread is obtained from the thread pool, there will be no need to reattach it to the JVM. It will already be attached. Thus, it can be used as is to execute a JAVA application. By eliminating the need to constantly attach and detach threads, the sticky attach mechanism significantly decreases overhead. This in turn increases overall system efficiency.

Un uso de JAVA se ejecuta típicamente como sigue. Primero, un hilo de rosca de una piscina del hilo de rosca se une a la máquina virtual de JAVA (JVM). Entonces, ese hilo de rosca se utiliza para ejecutar el uso de JAVA. La ejecución del uso de JAVA se termina una vez, el hilo de rosca se separa del JVM y se vuelve a la piscina del hilo de rosca. Esto se repite para cada ejecución de un uso de JAVA. Porque esta constante que une y que separa de hilos de rosca impone gastos indirectos adicionales ante el sistema, este proceso es ineficaz. Para mejorar la eficacia del proceso de la ejecución, un mecanismo de la "fijación pegajosa" se proporciona. Con la fijación pegajosa, un hilo de rosca no se une y no se separa del JVM cada vez que se ejecuta un uso de JAVA. Algo, un hilo de rosca se une al JVM solamente una vez: la primera vez que se utiliza para ejecutar un uso de JAVA. Cuando la ejecución del uso de JAVA se termina, el hilo de rosca se vuelve a la piscina del hilo de rosca sin separar del JVM. Esa manera, la próxima vez que ese hilo de rosca se obtiene de la piscina del hilo de rosca, allí no será ninguna necesidad de reatarla al JVM. Será unida ya. Así, puede ser utilizada al igual que ejecutar un uso de JAVA. Eliminando la necesidad de unir y de separar constantemente los hilos de rosca, el mecanismo pegajoso de la fijación disminuye perceptiblemente por encima. Esto alternadamente aumenta eficacia del sistema total.

 
Web www.patentalert.com

< Radiation image radiographing apparatus

< Method and system for platform-independent file system interaction

> Animal care registry system and method

> Data reallocation among storage systems

~ 00120