Browse thread
Re: Interpreter vs hardware threads
- Michael Hicks
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Michael Hicks <mwh@d...> |
| Subject: | Re: Interpreter vs hardware threads |
> Does anyone know how fast the ocaml bytecode interpreter > 'switches' between threads (that is, what is the scheduling overhead?) > Assume most of the threads are waiting (say, on a condition variable). > Asume LOTS of threads (thousands). > > [Hardware threads are not fast enough] Remembering back to the thread scheduler in Ocaml 2.00 (I assume it's the same one), I recall that the context switch directly relates to how many threads are waiting. This is because at each CS point, every thread is checked to see if its timeout has expired or has some I/O ready. As a result, performance degrades sharply as you add more threads. With a small number of threads (around 10) on a Pentium II 300 MHz machine, we measured the context switch time to be about 100 microsecs. See our INFOCOM 99 paper for more info on the system we were measuring this in (our active network, PLANet): http://www.cis.upenn.edu/~switchware/papers/infocom99-plan.ps. Mike -- Michael Hicks Ph.D. Candidate, the University of Pennsylvania http://www.cis.upenn.edu/~mwh mailto://mwh@dsl.cis.upenn.edu "The pessimist sees difficulty in every opportunity. The optimist sees the opportunity in every difficulty." -- Winston Churchill