A virtual machine system residing on a native machine comprises application code
in a virtual machine specific format, native methods in a native machine specific
format, and a plurality of execution entities that execute the application code
and the native methods in parallel. An execution entity manager assigns a native
method to an execution entity for execution. Based on an evaluation of the potential
behavior of the native method, the execution entity manager assigns the native
method to an execution entity optimized for the needs of the native method and
the virtual machine system. This allows native methods that execute correctly in
parallel to be assigned to an execution entity optimized to minimize system resources.
Native methods that interfere with the parallel execution of other execution entities
are assigned to an execution entity optimized to ensure correct native method operation.