[comp.sys.apollo] More OS questions

Jinfu@cup.portal.com (02/28/88)

I have several qustions about processes:

1)  How can I get a name of a process? The standard proc_$get_info
    doesn't return any information about the name of process. Is the
    4 byte long UID related to any text string(name of the process)?
    Also is there a call to name the process itself, like some of the
    server programs (spm server, mbx_server) do?

2)  Is there any SID (user.project.org.node) related to a process and
    can be accessed? 

3)  Are there any standard calls equivalent to /com/ppri and /com/sigp
    available?

4)  Is there any kind of ownership of a process? Or at least some
    kind of protection scheme to protect a process being killed by
    inappropriated user. In VMS, you can setup a process so that other
    users without privilege can't change its priority or stop the
    process. I would like to see something similar implemented in
    Aegis. The protection scheme would be:

    a) Only the owner of a process can modify its priority (/com/ppri)
       or stop it(/com/sigp), or
    b) %.sys_admin and %.locksmith can perform the same.
    c) a option to make a process without protection (open process)
       if desired.


   Jinfu Chen
   arpa: jinfu@cup.portal.com

rich@eddie.MIT.EDU (Richard Caloggero) (03/01/88)

In article <3528@cup.portal.com> Jinfu@cup.portal.com writes:
>
>I have several qustions about processes:
>
>1)  How can I get a name of a process? The standard proc_$get_info
>    doesn't return any information about the name of process. Is the
>    4 byte long UID related to any text string(name of the process)?
>    Also is there a call to name the process itself, like some of the
>    server programs (spm server, mbx_server) do?
>
>2)  Is there any SID (user.project.org.node) related to a process and
>    can be accessed? 
>
>3)  Are there any standard calls equivalent to /com/ppri and /com/sigp
>    available?
>
>
>
>   Jinfu Chen
>   arpa: jinfu@cup.portal.com




	----------



      I can answer some of these, but I'm not sure how helpful my
answers will be.

	1). From what I can gather (not having documentation to go by),
a process is named by *cataloging* it in the filesystem of the node it
lives on.  The details of this mechanism aren't clear to me, but the
command "/com/ctob" will perform the right incantation given a uid and
pathname.  For a process, if you know its uid, you can do "/com/ctob
`node_data/proc_dir/name_of_process uid_hi uid_low".  If you then
examine `node_data/proc_dir, you will find an object there with name
"name_of_process".  This object, however, isn't a real file, its just a
pointer to the object whose uid is stored in it.  CanAnyone provide
more details about this process?  Are there any system call(s) which
perform this kind of thing?  Will process naming be supported in
Domain/OS, or will all process have only those silly uid's and pids
associated with them?
     There is a call "pm_$set_my_name(name,name_length,status)",
however I don't think it was intended to be called from a user program
(correct me if I'm wrong)!

	2). Each process is indeed associated with an sid.  The call
"pm_$get_sid_txt(maxlen,sid,len)" will return a string representing the
sid of the process calling this procedure. There are other
(undocumented) calls in the pm library "acl_$get_sid" for example which
might return the sid of a specified process, but again, these calls
seem to be for internal use.
	...
	....
	...





	[ Thanx to those who have responded to my
	  question on native ethernet. Also, I have gotten some responses to
	  my query about mail servers on usenet. I will
	  post my findings soon.
	]

-- 
						-- Rich (rich@eddie.mit.edu).
	The circle is open, but unbroken.
	Merry meet, merry part,
	and merry meet again.