l4-hurd
[Top][All Lists]
Advanced

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

Re: thread management


From: OKUJI Yoshinori
Subject: Re: thread management
Date: Tue, 07 Nov 2000 21:55:44 +0900

From: Erik Verbruggen <address@hidden>
Subject: Re: thread management
Date: Tue, 7 Nov 2000 11:22:35 +0100

> (the last are often called Light Weight Treads). What the paper above
> does not mention is how and who decides to suspend one user thread from
> a kernel thread and attach the kernel thread to another user thread.
> Yes, this is the scheduler, but if the scheduler is in userland, how can
> it fairly decide to reschedule? And how does it actually suspend a
> thread that is running? 

  I'm not sure, since I haven't read the source code of Solaris, but
the paper does mention some hints about them. It says that the
schedular switches a thread to another when (1) the time slice of
current thread expires, or (2) current thread waits for a (user-level)
synchronization object. As each LWP can have its own timer handler,
(1) was easily implemented in Solaris, and it is trivial to implement
(2). And, they wrote that in their implementation, it was important to
make signal handlers re-entrant, so perhaps the schedular is just a
library function which can be called from both signal handlers and
ordinary functions, and it can be called from any thread.

  I hope this explanation will be helpful.

Okuji



reply via email to

[Prev in Thread] Current Thread [Next in Thread]