9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Philippe Anel <xigh@free.fr>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] stack reclamation on Unix using clone, rfork_thread, etc.
Date: Fri,  4 Jun 2004 17:20:08 +0200	[thread overview]
Message-ID: <6.1.1.1.0.20040604170542.02253db0@pop.free.fr> (raw)
In-Reply-To: <ee9e417a04060407397709613f@mail.gmail.com>

At 04:39 PM 6/4/2004, you wrote:
>Anyone have any idea how one is supposed to arrange
>to free the stack on which a shared-memory proc is
>running?
>
>In my current implementation, I have a routine called
>stackalloc() that keeps a list of all stacks ever allocated
>along with the pids they were allocated for, and every Nth
>time it gets called, it scans the list freeing the stacks that
>correspond to processes that no longer exist.
>
>Damn TLB-friendly operating systems.
>
>Russ

Hello,

I would associate each stack segment to an 'address space' structure
shared by each shared-memory process.
When the reference counter of this structure goes to zero, I would
free all the segment 'associated' to this structure (and free the structure 
:) ).

I thought plan9 doesn't share process stack segment, am i wrong ?
If it doesn't share these segments you only have to free the stack when the
process is ending.

         Philippe,



  reply	other threads:[~2004-06-04 15:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-04 14:39 Russ Cox
2004-06-04 15:20 ` Philippe Anel [this message]
2004-06-04 15:23   ` Philippe Anel
2004-06-04 18:30 ` boyd, rounin
2004-06-04 18:38   ` Russ Cox
2004-06-04 15:33 Richard C Bilson
2004-06-04 15:53 ` Russ Cox
2004-06-04 18:43   ` boyd, rounin
2004-06-04 16:22 ` Philippe Anel
2004-06-04 16:24   ` Philippe Anel
2004-06-04 16:38   ` Russ Cox
2004-06-04 16:43     ` Charles Forsyth
2004-06-04 19:02   ` boyd, rounin
2004-06-04 18:35 ` boyd, rounin
2004-06-04 16:44 Richard C Bilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6.1.1.1.0.20040604170542.02253db0@pop.free.fr \
    --to=xigh@free.fr \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).