All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julian Stecklina <der_julian@web.de>
To: xen-devel@lists.xensource.com
Subject: Some comments on multiple threads in Mini-OS
Date: Tue, 15 May 2007 13:57:02 +0200	[thread overview]
Message-ID: <f2c76e$2i3$1@sea.gmane.org> (raw)

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

                 reply	other threads:[~2007-05-15 11:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='f2c76e$2i3$1@sea.gmane.org' \
    --to=der_julian@web.de \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.