From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: David Presotto To: 9fans@cse.psu.edu Subject: Re: [9fans] shared memory In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-jjfznfmqgzjrpxyhjhqtpgyvtv" Date: Fri, 12 Sep 2003 08:12:31 -0400 Topicbox-Message-UUID: 32596332-eacc-11e9-9e20-41e7f4b1d025 This is a multi-part message in MIME format. --upas-jjfznfmqgzjrpxyhjhqtpgyvtv Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit 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. --upas-jjfznfmqgzjrpxyhjhqtpgyvtv Content-Type: message/rfc822 Content-Disposition: inline Received: from plan9.cs.bell-labs.com ([135.104.9.2]) by plan9; Fri Sep 12 04:52:20 EDT 2003 Received: from mail.cse.psu.edu ([130.203.4.6]) by plan9; Fri Sep 12 04:52:18 EDT 2003 Received: by mail.cse.psu.edu (CSE Mail Server, from userid 60001) id 3895C19AB3; Fri, 12 Sep 2003 04:52:12 -0400 (EDT) Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.30.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 6BA7919A99; Fri, 12 Sep 2003 04:52:08 -0400 (EDT) X-Original-To: 9fans@cse.psu.edu Delivered-To: 9fans@cse.psu.edu Received: by mail.cse.psu.edu (CSE Mail Server, from userid 60001) id 4E83B19A8B; Fri, 12 Sep 2003 04:51:15 -0400 (EDT) Received: from granite.cias.osakafu-u.ac.jp (granite.cias.osakafu-u.ac.jp [157.16.101.69]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 1949C199A3 for <9fans@cse.psu.edu>; Fri, 12 Sep 2003 04:51:14 -0400 (EDT) Message-ID: To: 9fans@cse.psu.edu Subject: Re: [9fans] shared memory From: okamoto@granite.cias.osakafu-u.ac.jp In-Reply-To: MIME-Version: 1.0 Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Fri, 12 Sep 2003 17:52:08 +0900 X-Spam-Status: No, hits=-0.2 required=5.0 tests=IN_REP_TO,NO_REAL_NAME,QUOTED_EMAIL_TEXT version=2.55 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) > 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 --upas-jjfznfmqgzjrpxyhjhqtpgyvtv--