Julian Stecklina
2007-May-15 11:57 UTC
[Xen-devel] Some comments on multiple threads in Mini-OS
Hello, this is based on the Mini-OS in the xen-3.0.4-testing.hg repository, so if any of this has been obsoleted, please say so. :) Multithreading in the Mini-OS (on x86) has some problems: a) a stack overflow overwrites the pointer to the thread''s "struct thread". Perhaps one could a segment register to point to the thread control block? b) GCC seems to use ESP as general purpose register now and then. This makes get_current() or current return bogus values. A workaround to that is to not inline get_current() or use the pointer to a local variable (which is an approximation to the current stack pointer) to compute the struct thread pointer. c) All threads are limited to the same stack size. d) and yes, it''s cooperative, but I can live with that. Just my 2 cents and patches are on their way once I have updated my stuff to unstable. Regards, Julian _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel