WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Some comments on multiple threads in Mini-OS
From: Julian Stecklina <der_julian@xxxxxx>
Date: Tue, 15 May 2007 13:57:02 +0200
Delivery-date: Tue, 15 May 2007 04:55:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.10 (X11/20070221)
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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] Some comments on multiple threads in Mini-OS, Julian Stecklina <=