Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Nov 1999 12:38:51 -0500
From:      "Daniel M. Eischen" <eischen@vigrid.com>
To:        Julian Elischer <julian@whistle.com>, arch@freebsd.org
Subject:   Re: Threads stuff
Message-ID:  <38440BAB.E547CA61@vigrid.com>
References:  <Pine.BSF.4.10.9911282113490.544-100000@current1.whistle.com> <384270AE.D0250340@vigrid.com>

next in thread | previous in thread | raw e-mail | index | archive | help
"Daniel M. Eischen" wrote:
> 
> Julian Elischer wrote:
> > > Yes, I understood them just fine :)  I'm still not sold on the new
> > > syscall gate and IOCB, because I think we have to make at least one
> > > system call when threads are switched or resumed.
> > >
> >
> > I'm not completely sold on them either.
> > I just have a gut feeling on it based on doing this for 25 years.
> 
> Well let's see if we can make them work, now that we know more
> of the issues.
> 
> One potential problem I see with placing the IOCBs at a fixed location
> in the calling threads stack is that you then are tied to having
> to find TSD for every system call.  I say TSD, but really mean
> you have to go through the same hoops as getting TSD.  We don't
> know how fast this is going to be for i386.
> 
> I think if we allocate the IOCB from the stack at the time
> of the system call, it will be faster.  If the thread blocks,
> then kernel can provide enough information so that the UTS
> upcall can find the IOCB, set the IOCBptr in the current
> thread, mark the thread as blocked, etc.

Aside from the above issue, the other issue I had with Julians
async-call gates and having the kernel complete the KSEs is that
the UTS needs an "interrupt" type mechanism in order to check for
threads in wait/timeout conditions and to preempt running threads
that have exceeded their quantum.  My argument was that we
need to perform at least one system call for each thread switch
in order to achieve this, so why have an async-call gate if we
have to reenter the kernel anyways?

I think we can fulfill our needs with a fixed interval timing
mechanism, and to properly account for time spent in the system
on a per-KSE basis.

So, FWIW, I am prepared to sign up to Julians async call gate
proposal.  I think we can perform thread switches totally in
userland without any assistance from the kernel.

Dan Eischen
eischen@vigrid.com




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38440BAB.E547CA61>