Re: sproc FOLLOW-UP

New Message Reply Date view Thread view Subject view Author view

Glenn Waldron (gwaldron++at++peril.com)
Wed, 16 Jul 1997 21:37:26 -0400


Tom Impelluso wrote:
>
> This is a follow-up to my question on sproc() vs fork() with Performer.
...
> As I understand, sproc() is like fork(), but the sproc()'ed process is
> in the same address space. Thus, I can obviate the necessity for
> shared memory. and all that expensive overhead.
>
> But, from what I read, sproc() is "like" a lightweight thread.
...
> But I fear that I will shortly collide with some internal design problem...
> afterall, in a strict philosophical sense, I am using sproc() to
> create a child that is VERY FAR from being a lightweight process.

"lightweight" in this context doesn't mean the thread can't do a lot of
work. Speculation: I believe it means that the system overhead involved
in
maintaining it as a separate thread (context switching, etc) is lower
than
for a formal process.

sproc() is powerful and perfect for applications like yours -- I do it
all the time and it always works great. BTW, although you don't need
shared
memory, you should still use semaphores to meter access to the data
space
you're sharing.

Also, you can use sysmp(MP_ISOLATE,...) to dedicate a processor. This
works
for normal processes; I've never tried it on an sproc() thread. Just
don't
try to isolate to CPU 0..

enjoy, glenn.

-- 
Glenn Waldron - Technical Director
Peril Technologies - 2200 Wilson Blvd Ste 102-328 - Arlington VA 22201
mailto:gwaldron++at++peril.com - http://www.peril.com - voice: 703.598.7835
=======================================================================
List Archives, FAQ, FTP:  http://www.sgi.com/Technology/Performer/
            Submissions:  info-performer++at++sgi.com
        Admin. requests:  info-performer-request++at++sgi.com

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:55:37 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.