stuart@bms-at.UUCP (05/07/87)
Well, I love and am devoted to the design of MINIX, but already I am itching for improvement. One thing about MINIX, all my complaints are due to it's minimal nature, not to underlying problems. wini.c supports big disk just fine, but fsck is not so good. It calls a low level diskio() routine with a 16-bit sector number. I have hacked read_partition() to compute part_size, tracksiz, and cylsiz as well as part_offset (since my disk doesn't happen to have 4 heads). I hacked devio() to not add part_offset and to check last_sector against part_size instead of 65536. I hacked diskio() to add part_offset itself. part_offset is set to 0 for floppies. This allows any size disk with a partition limited to 32 Meg (just like DOS !?!). Unfortunately, fsck now goes into a CPU loop when trying to check a file system. I print out all the values computed by read_partition(), and they are correct. I will post the changes when they work. sh doesn't seem to disable signals for background processes. Using DEL interrupts back ground compiles. The single thread file system is the pits. Hard disk I/O has to wait for the floppy, and Control-S stops all background processing. Since MINIX is suitable for many applications besides file-systems requiring multi-thread control, it would be nice to have a general way to do it. Is there a way to handle co-routines in 'C' without kernel additions? If all thread transfers are at the same level, a big case statement will suffice. It would be nice to be able to suspend a (logical) operation while in a function, however. I am thinking about a library routine void split(int (*)(int),int,int) which will make n stack areas each with an invocation of the function passed. The invocations will receive a small integer to identify themselves. When all invocations have returned, the stack space is released and split() returns. There is another function, link(), which runs the other invocations. Any machine able to longjump() should be able to do this. Should signalling between invocations be supported also? A file system would have a dispatcher loop which would restart a given thread depending on the message arriving. Does this scheme allow this? How could C code determine stack space requirements in a portable manner? Earlier, someone suggested using a MINIX task for each device. This would stop the really annoying problems. The floppy will still hold up the harddisk for filesystem (as opposed to device) calls, however. I have read about the Mach-1 system. It is designed for 32-bit systems with MMU's. It has a design similar to MINIX, but differs in what the kernel supports. The Mach-1 kernel handles memory management as well as message passing and scheduling. MINIX handles fixed length messages and scheduling. MINIX can do anything Mach-1 can, however, by sending messages to special drivers that copy and otherwise manage memory. I like this extra modularity, although it results in extra messages for common operations like file/database servers. -- Stuart D. Gathman <..!seismo!dgis!bms-at!stuart>