So far we discussed a compiled library and an interpreted systems. Both of them benefit from the multithreaded ingredient.
|
For interpreted environments the multithreading support can be implemented in two ways:
-
Interpreted level only -- threads are implemented as interpretive objects. The context switch between threads does not involve swapping machine registers, but instead the interpreter is switched to interpret different threads.
-
Interpreted and compiled level -- each interpreted thread is mapped onto a compiled thread. The compiled thread consists of the interpreter which interprets the interpreted thread.
|
The example of the first approach is MOVIE, of the other -- the HotJava browser. Comparing those two, we can notice the following aspects:
|