9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: David Presotto <presotto@closedmind.org>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] shared memory
Date: Fri, 12 Sep 2003 08:12:31 -0400	[thread overview]
Message-ID: <dabedc3d149fc7dd738415fab43b2391@plan9.bell-labs.com> (raw)
In-Reply-To: <b7dbb55d564e34d09fe59ddea98ca20d@granite.cias.osakafu-u.ac.jp>

[-- Attachment #1: Type: text/plain, Size: 697 bytes --]

man segment

I wrote that for a business unit at lucent that needed globally shared
segments for in memory databases.

     EXAMPLE
          Create a one megabyte segment at address 0x10000000:
               % bind '#g' /mnt/segment
               % mkdir /mnt/segment/example
               % echo 'va 0x10000000 0x100000' > /mnt/segment/example/ctl

          Put the string ``hi mom'' at the start of the segment:
               % echo -n hi mom > /mnt/segment/example/data

          Attach the segment to a process:
          {
               ulong va;

               va = segattach(0, "example", 0, 0);
          }

You'll have to make a kernel with devsegment in it.

[-- Attachment #2: Type: message/rfc822, Size: 2128 bytes --]

From: okamoto@granite.cias.osakafu-u.ac.jp
To: 9fans@cse.psu.edu
Subject: Re: [9fans] shared memory
Date: Fri, 12 Sep 2003 17:52:08 +0900
Message-ID: <b7dbb55d564e34d09fe59ddea98ca20d@granite.cias.osakafu-u.ac.jp>

> It exists.  segattach(2) and rfork(2) should get you started.  You'll
> want to use lock(2), rendezvous(2), or thread(2) to coordinate access.
> pool(2) can be used to allocate pieces of it.

Hmm, I'm an application programmer at most, and want some
more user friendly functions such as shmat() etc.  Isn't it impossible?

kenji

  parent reply	other threads:[~2003-09-12 12:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-12  5:32 [9fans] g++ YAMANASHI Takeshi
2003-09-12  7:25 ` okamoto
2003-09-12  9:29 ` northern snowfall
2003-09-12  8:33   ` okamoto
2003-09-12  8:43     ` [9fans] shared memory okamoto
2003-09-12  8:48       ` Geoff Collyer
2003-09-12  8:52         ` okamoto
2003-09-12  9:25           ` Geoff Collyer
2003-09-12  9:30             ` Charles Forsyth
2003-09-12 15:33               ` splite
2003-09-12 16:11             ` boyd, rounin
2003-09-12 12:12           ` David Presotto [this message]
2003-09-16  3:07             ` okamoto
2003-09-15 13:30               ` okamoto
2003-09-16  4:23               ` Russ Cox
  -- strict thread matches above, loose matches on Subject: below --
2002-07-29 11:13 paurea
2002-07-29 13:56 ` Ronald G Minnich
2002-07-29 13:59   ` Ronald G Minnich
2002-07-31 12:52 ` andrey mirtchovski

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=dabedc3d149fc7dd738415fab43b2391@plan9.bell-labs.com \
    --to=presotto@closedmind.org \
    --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).