Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!cbmvax!amix!skrenta From: skrenta@amix.commodore.com (Rich Skrenta) Newsgroups: comp.os.misc Subject: More questions about Amoeba and Capabilities Message-ID: <2623@amix.commodore.com> Date: 14 Jun 91 16:55:33 GMT Organization: Commodore-Amiga Unix Development Lines: 51 Two questions for fans of Amoeba or other capability-based systems. Question #1: An Amoeba server is only listening on a port if it is blocked in a get_request(port, ...) call. Does this mean that if the server runs out of threads executing get_requests that the service appears to vanish to prospective clients? A client trying to locate the service port might fail just because the service is busy. How is this dealt with in Amoeba? client does: do_operation(port, ...); server does: spawn_lightweight_threads(10); for (;;) { get_request(port, ...); process_request(); put_reply(...); } If all 10 lightweight threads are tied up in process_request(), the server won't be executing any get_requests on its port, and the client's do_operation will fail. Question #2: The bullet file server returns a capability when you ask it to create a file. The capability must be presented to perform operations on the file such as read, write and delete. capability = create_file(...); Presumably you're supposed to add this capability to a directory or otherwise responsibly manage it. But what if you "lose" it? capability = 0; The capability is not stored anywhere, but the bullet file server doesn't know this. There is an unreferenced file on the file server with no way to "garbage collect" it. It seems that during the development of even a simple program there would be potential to lose references to many files. Not even the programmer whose errant program had created these files could reclaim them. Is there a solution? Rich -- skrenta@amix.commodore.com