Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Apr 1996 13:36:19 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        hasty@rah.star-gate.com (Amancio Hasty Jr.)
Cc:        terry@lambert.org, wong@rogerswave.ca, roell@blah.a.isar.de, hackers@FreeBSD.ORG, roell@xinside.com
Subject:   Re: The F_SETOWN problem..
Message-ID:  <199604112036.NAA04732@phaeton.artisoft.com>
In-Reply-To: <199604111857.LAA02569@rah.star-gate.com> from "Amancio Hasty Jr." at Apr 11, 96 11:57:03 am

next in thread | previous in thread | raw e-mail | index | archive | help
> >>> Terry Lambert said:
>  > > > AST's are easy.  It's the stacks they need to run while your program
>  > > > is already using your only stack that are annoying.
> 
> Is this a problem? Lets look it at it from a different angle what happens
> when the user's process stack space is exhausted-- the process dies.
> 
> So what is wrong with allocating a fix sized stack for handling ast events?

It is common to put a huge amount of code in an AST, including
potentially blocking system calls and calls to start other
activity that could, itself, result in an AST.  Which is to say
that a small fixed size stack is unacceptable.

In many cases, the entire program operates in nothing but AST's --
if you have the VMS source code, look at the PHONE utility.

It's common to do this in signal handlers as well, even though it's
bad practice.

Hell, since BSD does not virtualize interrupt handling, it's common
to do with code that runs at interrupt time as well.


The problem with allocating a fixed stack in these circumstances is
that it's too small.

AST's need to fire in a shared heap, seperate stack environment.

As I said before, VMS's additional split in protection domains allows
this to happen.


An AST needs to be able to fire when another AST is being handled and
has made a blocking call, otherwise you lock yourself out of the most
useful aspects of AST's compared to signals.  Since it's a DEC internal
product, I don't expect you to be familiar with DEC's MTS (MultiThreading
Services), but they are on the order of changing a blocking call to
a call with AST plus a context switch.  Like pthreads, except signals
don't get screwed as a result.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



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