All of lore.kernel.org
 help / color / mirror / Atom feed
* Some comments on multiple threads in Mini-OS
@ 2007-05-15 11:57 Julian Stecklina
  0 siblings, 0 replies; only message in thread
From: Julian Stecklina @ 2007-05-15 11:57 UTC (permalink / raw)
  To: xen-devel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-05-15 11:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-15 11:57 Some comments on multiple threads in Mini-OS Julian Stecklina

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.