This paper presents an implementation method of application-specific l
ightweight processes (threads). The main feature of this method is tha
t the design of lightweight processes is done by using meta-level prog
ramming techniques. In this method, lightweight processes are implemen
ted by using the concepts of microprocesses and virtual processors. A
microprocess is an application-level (user-level) lightweight process
and it is included in a regular (heavy weight) process. Microprocesses
are executed by virtual processors which are provided by the operatin
g system kernel. A virtual processor is an entry of a real processor w
hich is assigned to an application process by the kernel. In this meth
od, a virtual processor is regarded as a meta-lightweight process of u
ser-level lightweight processes, Application programmers can describe
the behavior of lightweight processes at the meta-level as well as at
the base lightweight process level. In other words, application progra
mmers can control lightweight processes by dealing with virtual proces
sors, Each virtual processor has its own private areas of memory, Thes
e areas correspond to the lightweight-process-specific data areas, and
they are used to store the identifier of the virtual processor, the v
ariables and the stack of the lightweight process scheduler. At the me
ta-level, events for state transitions of lightweight processes are re
corded, and they are used to tune performance.