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

Re: posix threads



On Mon, 28 Jun 1999, Michael Lee wrote:

> Is it correct to assume that OpenBSD has kernel level threads?  Given that

No.

> the thread lives in user space, how do multiple threads, from the same
> process, get scheduled on a system with more than one CPU?  Is the level

Easy.  User land processes can set timers, so now you can set a timer
interrupt and call a scheduler.  In order to do thread context switches,
all you need to change (more or less) is the program counter (instruction
pointer in i386speak) and stack pointer, both of which are accessible from
userland.
.......................................................................
: "Welcome to NSA's Web Server!"                   : Trevor Schroeder :
:                     -- National Security Agency  : tschroed@acm.org : 
:........... http://www.zweknu.org/ for PGP key and more .............: