Re: Different approach - harder to understand
"Nuno Emanuel F. Carvalho" wrote:
> On Mon, 10 May 1999, Matthias Pfisterer wrote:
> > To give you a quick shot, a Mach port is an abstraction of a
> > communication channel between programms. The communication on these
> > ports follow a message passing model. This means that, in contrary to
> > communicating by ordinary function calls, the two processes
> > communicating with each other need not be in the same memory space or on
> > the same machine. In theory this allows servers to run on different
> > machines, forming what is called a distributed operating system.
> It's using something like remote procedure calls(RPC's) !?
It now comes to areas in which I am not firm. To my knowledge, the hurd
servers make heavy use of RPCs. But I'm not sure if the port mechanism
itself are RPCs or RPCs are implemented on top of them. I think, it's
now time for you to do the same as I do from time to time: Read the Mach
manuals, read the GNU Hurd manual, and look at the source code.
> > There is another notable thing with (Mach) ports: a single port is not
> > globally available in the system. It is rather only known to the task
> > (for now, think of a task being something simular to a process) which
> > created it and to tasks the port was explicitely passed to by the owner.
> So we could have thousands of ports ...
> > Because of this property, ports are used to control the security of the
> > system: A certain resource or service is available only the tasks which
> > have ownership or knowledge of a port that is connected with the
> > resource or service.
> We could say that each port has something like a userid/groupid
> associated just like files on Linux, rigth !?
There is no direct relation. It is simular to tasks vs. processes: ports
rights (there are read and write ones) are a low-level concept, whereas
userids are a high-level concept. Ports are primarily for communication,
the usage to identify entities is rather a side-effect used by the auth
server (which does the mapping between, uids and ports, if I understood
the issue correctly). Here, too, I can't tell you more details, read the