Liblor / advanced_operating_systems_2020

Advanced Operating System Course at ETHZ
MIT License
19 stars 4 forks source link

Nameserver/init #142

Closed leopoldsedev closed 4 years ago

leopoldsedev commented 4 years ago

Nameserver concept

The nameserver will be implemented as a UMP server and processes communicate with it only indirectly over their respective monitor like with all other servers right now. Once the nameserver is fully implemented, all processes will communicate with every "ordinary" server (non-ordinary servers are the memory server, monitor, and the nameserver itself) directly over UMP (as opposed to now where they route all their requests over the monitor via LMP). If a process then sends a lookup to the nameserver the nameserver will send an add client request (over UMP) to the respective service that was requested. The service will provide a new communication channel (i.e. a frame capability for UMP communication), which will be sent as a reply back to the original requesting process.

As a result, every "ordinary" server can run in its own domain and processes are able to acquire a direct UMP communication channel to any arbitrary service by calling the lookup function.

The memoryserver is actually supposed to be handled as an "ordinary" server as well, but it's a special case since the nameserver itself depends on it.

In theory it would be possible to give the process upon lookup a LMP channel if it is running on the same core. The tricky part there would be to put the LMP channel (which will comprise of an endpoint capability) into a response from the nameserver (which has to be a UMP message). Since our UMP implementation currently cannot transmit capabilities other than frames, this is currently not directly possible. Maybe this could be implemented using a local task that the nameserver sends to the monitor running on that core, where the monitor sends the endpoint capability to the requesting process.

The monitor servers should register at the nameserver, then the process server can look them up so that it can send them local spawn tasks.

Remaining tasks

eikendev commented 4 years ago

@leopoldsedev, please merge my changes for making dispatchers aware of their own PID.