Path: utzoo!mnetor!uunet!nuchat!sugar!peter From: peter@sugar.UUCP (Peter da Silva) Newsgroups: comp.misc Subject: Re: Message based OSs (was "Re: GNU Manifesto") Message-ID: <1507@sugar.UUCP> Date: 2 Mar 88 03:07:55 GMT References: <1447@sugar.UUCP> <227@gandalf.littlei.UUCP> Organization: Sugar Land UNIX - Houston, TX Lines: 43 In article <227@gandalf.littlei.UUCP>, adams@littlei.UUCP (Robert Adams) writes: > From article <1447@sugar.UUCP>, by peter@sugar.UUCP (Peter da Silva): > > MINIX isn't terribly real. It's realler than GNU (after all, it's out :->), > > but it's got a small fraction of V7, and it's buggy. Comes from having > > everything handled by messages. This wasn't a fair statement. I should have said "it comes from having everything handled by rendezvous". Minix messages are not queued, so it's sort of a cross between a coroutine-based system like UNIX and a message based system like AmigaDOS. It has lower overhead on a context switch than UNIX, but more than AmigaDOS (this is partially due to the comparative amounts of memory protection in the three systems). I have been informed by a reliable source that the biggest problem is that the TTY driver gets deadlocked by the disk driver or the file system. I have had very good luck with a pure message based system: AmigaDOS. The main thing you have to make sure of on a system like this is that context switches be efficient, because they happen often. For example, when you read a byte from a file, and the block is already in memory. On UNIX you switch to supervisor mode, do some playing around in the open file table and the in-core inode table, and copy a byte back to user space. No context switches, no waits. In AmigaDOS you send a message to the handler process associated with that file, and receive a message back. Two context switches, and the system gets to run around the list of active processes. The only saving grace here for Amy is that a context switch costs about as much as a system call in UNIX does. There are no MMU registers to poke around with, and the next available task can be found at the head of the run queue. In UNIX you have to save a lot more state, and UNIX generally looks through all active processes to decide what to run next. On the other hand UNIX has to force more context switches than AmigaDOS to enforce fair use of the system, because otherwise programs would tend to use up all their quanta. Of course real state-of-the-art message based systems are generally running over networks or in multiprocessor systems (pretty much the same sort of problem here), so the cost for sending a message is frequently a LOT higher. Just how much do RPCs cost?