[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Different approach - harder to understand




Roland McGrath wrote:
> [...]
> 
> > "This mechanism is used quite obviously for mount.  A mount point would
> > have a translator associated with it.  When a user opens the mount
> > point, the translator, in this case, a program which understands the
> > disk format of the mounted filesystem, is executed, and returns a port
> > to the user."
> >
> >  What's this port !? It's a number ?
> >  It's the same idea of port like: port 25 for mail, 22 for ssh, etc ...?
> 
> No, it's a Mach port.  See the CMU/OSF Mach documentation.

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. I do
not know whether this is already possible with the Hurd, but I would
like it very much.
Note that the above term "process" is not really correct. Processes as
know from the Unix kernel interface are a high-level abstraction. Mach
instead has low-level abstractions "task" and "thread". For more details
please read the original documentation.
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.
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.

> [...]

Matthias Pfisterer


Reply to: