Shared Memory in BSD4.3 is lacking?

Chris Torek chris at trantor.umd.edu
Sun Feb 28 20:23:18 AEST 1988


>In article <2329 at umd5.umd.edu> I wrote:
>:Anyway, BSD does not have System V style shared memory ... because
>:System V shared memory is wrong.  (Now there is a good flammable
>:statement for you :-) )

In article <2009 at ho95e.ATT.COM> wcs at ho95e.UUCP
(46323-Bill.Stewart,2G218,x0705,) writes:

[For what *are* all those numbers in your name, anyway? :-) ]

>Ok, I'll flame!  What's wrong with System V shared memory?

You name it yourself.  First:

>I agree that the user interface is annoying,

(It feels like something IBM might have invented.)

>having chosen clunky-but-general over cleaner-but-less-general,

There are cleaner approaches that are still general.  While it is
true that most hardware restricts sharing to page-sized or larger
segments, finding sharable locations in SysV is not at all easy.
Moreover:

>Much of the problem with the interface is that your program has
>to find and hook up to shared memory somehow, and the shared
>memory has to be able to stick around when unused.

Now, name something that any Unix program can find, and that sticks
around when unused (at least until you run `rm' ...  oops, I think
I just gave it away :-) ).  *Why* does SysV use an entirely separate
name space for shared memory?  (Answer: because it was easy to
write that way.)

Additionally, the total number of shared pages allowed is, I believe,
compiled into the kernel.  (There are a number of similar grotesqueries
in the 4BSD kernel, again because it was easy to implement that
way.)  Finally, there is, it seems, no way to have sbrk and shm*
co-operate.  The future BSD shared memory will cure all of these
defects, or at least we think so....
-- 
In-Real-Life: Chris Torek, Univ of MD Computer Science, +1 301 454 7163
(still on trantor.umd.edu because mimsy is not yet re-news-networked)
Domain: chris at mimsy.umd.edu		Path: ...!uunet!mimsy!chris



More information about the Comp.unix.wizards mailing list