From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@cse.psu.edu Subject: Re: [9fans] Ephase question. From: "rob pike, esq." MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Wed, 14 Aug 2002 09:19:43 -0400 Topicbox-Message-UUID: dcb292b0-eaca-11e9-9e20-41e7f4b1d025 > It would be an interesting academic exercise to determine the > minimal set. E.g. close() doesn't seem to be needed; whenever > there's no reference to the object, any connection to it can be > cleaned up. What about releasing the resources attached to the file descriptor / fid? A long-running command using hundreds of files in sequence - for instance a network server - would be a resource hog without close. Of course you could provide a garbage collector but that opens a whole new world of trouble. > At least for Unix devices, it was only the *last* > close that did anything interesting. Except for releasing the fd. > And I've sometimes had > the feeling that bind and mount aren't dissimilar enough to > require separation. The earliest version of Plan 9 had a different setup than bind and mount; it was mount and fmount. It was a mess. I don't remember much about it but the current scheme was a huge improvement - huge. I think for instance exportfs might have been impossible in the old scheme. But there well may be a unified approach that we just missed. In any case, who cares? As you said, it's academic. I can do everything with a single system call, syscall, that takes as its first argument the call to make. If you call that cheating, I respond that rfork is really a set of calls encoded with a bitvector. Nobody asks what the minimum libc interface is, or even counts the calls. For some reason system calls are seen as magical. They're just one way to implement a library. In Plan 9 in particular, we've tried to blur the difference between syscall and library, with things moving back and forth over time. Stat, wait, and read (!) are no longer system calls. What matters is expressibility without bloat, not finding the criteria under which to claim a lower count of functions of type T, for some T. -rob