Re: sproc FOLLOW-UP

New Message Reply Date view Thread view Subject view Author view

Sharon Clay (src++at++rose.engr.sgi.com)
Thu, 17 Jul 1997 02:19:26 -0700


+>---- On Jul 16, 9:37pm, Glenn Waldron wrote:
> Subject: Re: sproc FOLLOW-UP
->
->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.

Yes. FYI, Creation of a sproced process is also NOT lightweight!
All processes in the share group will take a big hit when one
of them sproce a new process so you want to do all process creation
if at all possible up front.

You also want to do this after pfConfig() so that only the parent
of the sproc has a the room for this process (stack, etc.) allocated.

->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

Works fine on a sproc thread.

->don't
->try to isolate to CPU 0..

Right :-)
src.

-- 
-----{-----{---++at++   -----{----{---++at++   -----{----{---++at++   -----{----{---++at++
Sharon Rose Clay (Fischler) - Silicon Graphics, Advanced Systems Dev.
src++at++sgi.com  (415) 933 - 1002  FAX: (415) 965 - 2658  MS 8U-590
-----{-----{---++at++   -----{----{---++at++   -----{----{---++at++   -----{----{---++at++
=======================================================================
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.