I believe that correct terminology for cooperative threads is ?fibers?. However, fibering is
essentially a variety of threading, so I don?t think it is totally wrong to use
that word. Fibering is like a thread, but with the deteminism of cooperative
context switching.
In the single processor world, there are preemptive and
cooperative threading models, just as there is preemptive and cooperaitive
multitasking. The main difference between multithreading and multitasking is
that threads share memory and processes don?t. The context switching mechanism
does not have to be preemptive. Cooperative multitasking was used for Windows
3.x, and consequently many see this context switching technique as inferior to
preemptive, however I believe this is a bit naive. Cooperative context switching
fails to solve certain problems, but as with most things in computer science, a
technique may fail in one situation and be perfect in another. In particular
cooperative context switching fails to force programs to relinquish control in
environments where one program may take control (get stuck) causing the whole
computer to be stuck. It creates a computational injustice, all processes
suffer, if one doesn?t play nice. This is very annoying a single user computer,
but completely unacceptable in a multi-user environment. To solve this problem
required preemptive context switching, and there was no sense in OS makers only
applying this to process switching and not thread switching.
However,
JavaScript runs in a single user AND single process environment. If multiple
JavaScript threads can be triggered by developer, a developer can be fully
confident that he is responsible for them playing fairly. If one fails he is
responsible for fixing it. Therefore, the programmatic advantages of threading
can be acheived with the determinism of cooperation.
With the advent of
multicore technology more must be considered, plain fibering does not facilitate
taking advantage of the different cores. However, I think SMT could be a real
bonus here, because it allows one to effectively simulate the determinism of
fibering with fibers/threads running on multiple cores.
Authenteo 1.1 is available.
Now with
Firebug integration
. Make changes to CSS and HTML with Firebug and save the changes
Check out press releases and the following articles on Authenteo: