[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Some comments on multiple threads in Mini-OS


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.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.