A software system with a two tier arrangement for threads support that enhances
the adaptability of a virtual machine to differing platforms. The software system
includes a virtual machine with a threads interface layer having a set of methods
that provide thread support in the virtual machine according to a standard threads
interface associated with the virtual machine. The software system includes a native
threads interface layer that provides a set of methods that adapt the methods of
the threads interface layer to a platform which underlies the software system.
The native threads interface layer shields the virtual machine from the particulars
of the underlying operating system while the threads interface layer provides a
stable interface for application programs and other tasks that benefit from thread
support in the virtual machine.