Why UNIX is superior to MAN

Saturday, 2009-01-10 00:43, 1231548231 seconds since Unix epoch

This whole evolution thing didn’t end up with an operating system we can be proud of. Nature inc can learn a lot from UNIX. I’ll try to explain my opinion using a few examples.

There’s only one kind of user space process in UNIX. Every process has it’s own unique process ID and a scheduler makes sure processes don’t get in the way of each other. Processes can leave messages for one another in well defined uniform ways.

MAN has two kind of processes, male and female. Many processes have the same name which makes it difficult to keep processes apart. Especially the male typed processes have a small name lookup table. There’s no real scheduling. Some processes tend to behave like masters, while most of the other processes run in slave mode. When a master process exits, a state called anarchism arises. A successful call to war(1) spawns a new master process. Processes communicate with a type-specific protocol. The female protocol seems to use more bandwidth than the male equivalent. It’s also quite awkward that the boolean type seems to be inverted. Communication between the two process types is possible, but might randomly call yell(2), cry(2) or even kill(2) in some cases.

UNIX is fairly secure. When configured right UNIX has a very low chance of being infected by some kind of virus. And even if it gets infected, a virus is just another process which can be kill(1)ed off easily. Processes can’t write to each other’s stack unless explicitly defined. Files have owners and access rights defined to them, and every process adheres to these access rights. Memory leaks will cause processes to grow larger, but an out of memory killer will eventually end the process.

Unlike UNIX, MAN isn’t that secure. Every process has a status indicator called health. Viruses aren’t processes but infect individual processes by inter process communication. An infection lowers the value of the health indicator. If health drops below a certain value, which is process specific, a process will cease to function. If it drops to zero, a process will call die(2). Usually processes are able to get rid of an infection themselves. If these attempts are unsuccessful, infected processes are quarantined until either die(2) is called, or an update for the built-in anti virus software solves the problem. Master processes in MAN are able to write to the stacks of slave processes using libmedia or the massively parallel version, libpropaganda. Files are loosely linked to an owner, but that can easily be changed by calling buy(2), steal(2) or find(1). All MAN processes will eventually start leaking memory. But unlike UNIX processes they loose weight until the stack collapses and die(2) is called.

Process structures in UNIX are very simple. A process can fork(2), creating a child process exactly like itself. If the parent process dies without kill(2)ing it’s child processes first, the child processes will turn into zombies. UNIX admins agree zombies should be kill(1)ed on sight.

MAN has very complicated process structures. Only a female process can call fork(2), but needs a male to provide the seed(3) IPC call, since it isn’t present in the female process libraries. But before that can happen a male and a female process have to be able to communicate, which can only happen using the narrow parallel between the two protocols. When a (fragile) line of communication has been formed, the two processes have to call mate(2) simultaneously. Processes can call mate(2) on their own too, but that will just result in a short spike in resource usage. There are theories about unsynchronized calls to mate(2) and effects upon the health indicator, but these are yet to be proven. After both calls have been successful, there’s a once in a month chance fork(2) will be called in the female process. This period, simply called period(4) is the only timer resource that’s quite accurate in the entire MAN system. The down side of period(4) usage is the change in efficiency of the female typed processes. The call itself takes a whopping nine months, during which period(4) is broken, with a huge I/O drain at the end. The process type of the child process, male or female, is determined by a call to rand(3) using the provided seed(3) result. Luckily MAN provides a shorthand to this complicated process, called make(1) love. Unlike UNIX, MAN knows several ways the connection between the parent processes and the child process can break. First, both the parent processes might call die(2). Second, one of the two parent processes can become a resource hog for which the other process calls divorce(2), taking half the stack size of the process for it’s own gain. It’s usually female processes that call divorce(2) by the way, male processes prefer kill(2). The third and final way for the connection to break is when the child process’s stack is large enough to get it’s own address space, instead of using the parent processes indirectly. If however the connection breaks because of one of the first two events, the child becomes an orphan. Within the MAN community kill(1)ing orphans is frowned upon. They are kept running instead until die(2) is called, or they are given to a new set of parent processes that fail at make(1) love.

The final point I’d like to address is the CPU usage by processes. Again, UNIX is fairly simple. A process is sleeping unless directed by the scheduler to do work, or if it’s in a sleep(2) call. This makes CPU usage fairly balanced between processes and the maximum amount of work gets done.

This feature is clearly broken in MAN. A process has to be in a single sleep(2) call for hours on end every day in order to work correctly. I guess this is MAN’s way of avoiding a scheduler. On top of that a MAN process tends to call sleep(2) when it’s supposed to work, and is quite actively calling mate(2) and other useless system calls when the there’s no work to be done.

In short, MAN is way too complex to be a functional system. It’s scheduling is broken and it’s API documentation mentions things that aren’t even on the system (soul_*() system calls, G_SPOT and something called “intelligence”). Just ignore it, it’s a fad. Stick with UNIX.

One Response to “Why UNIX is superior to MAN”



  1. Aike Says:

    Briljant!

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>