Leisner.Henr@xerox.com (Marty) (12/01/87)
I'm now running Minix on my PC-AT in protected mode (all descriptors in GDT, hardware task-switching installed, all interrupts and kernel have their own TSS). If you want a summary of what I'm doing, drop me a line. If there is sufficient interest in what I'm doing, I'll post to the net. I'll be ready to post a complete summary later this week. I'm using Aztec C. I wrote the following benchmarks quickly to have a measure of system performance: Forks: /* File: forks.c - created by Marty Leisner */ /* leisner.Henr 1-Dec-87 7:37:41 */ /* Copyright (C) 1987 by Martin Leisner. All rights reserved. */ #include <stdio.h> #define NUM_TIMES 1000 main() { register int i; int k; for(i = 0; i < NUM_TIMES; i++) switch(fork()) { case 0: exit(); break; case -1: printf("fork broke\n"); exit(); default: wait(&k); break; } putchar(7); } Pipes: /* File: pipes.c - created by Marty Leisner */ /* leisner.Henr 1-Dec-87 8:55:04 */ /* Copyright (C) 1987 by Martin Leisner. All rights reserved. */ #define BLOCK_SIZE 1000 #define NUM_BLOCKS 1000 char buffer[BLOCK_SIZE]; main() { int pipefd[2]; register int i; pipe(&pipefd); switch(fork()) { case 0: /* child code */ for(i = 0; i < NUM_BLOCKS; i++) if(read(pipefd[0], &buffer, BLOCK_SIZE) != BLOCK_SIZE) break; ; printf("child done, i = %d\n", i); exit(); break; case -1: perror("fork broke"); exit(); default: /* parent code */ for(i = 0; i < NUM_BLOCKS; i++) write(pipefd[1], &buffer, BLOCK_SIZE); puts("parent done"); wait((char *) 0); break; } } Running #time forks and #time pipes seems to work fine. Running #time forks & #time pipes & causes continuous hard disk activity for no apparent reason which I easily see (unless for some reason the fs is putting the pipe on disk). time reports half the system time for pipes when run the disk is always getting hit. By the way on a 8Mhz PC AT with my heavily hacked OS; #time forks (with 1k stack) real 25.0 user 1.6 sys 18.4 #time pipes (with 40K data) real 42.0 user 1.6 sys 35.5 #time pipes real 17.0 user 1.0 sys 14.0 I'd appreciated hearing from someone who has a distribution kernel running. I can't get a distribution kernel to run on a hard disk and I don't want to play floppy games. Essentially this measure out to 18.4 msec/fork with 1k data, 35+ msedc/fork with 40K data. I'm knocking about 80k/sec down the pipe. A 4.2 BSD Vax 11/780 knows about 120k/sec down a pipe with the same program. marty ARPA: leisner.henr@xerox.com GV: leisner.henr NS: martin leisner:henr801c:xerox
ast@cs.vu.nl (Andy Tanenbaum) (12/03/87)
In article <760@louie.udel.EDU> Leisner.Henr@xerox.com (Marty) writes: >I wrote the following benchmarks quickly to have a measure of system >performance: [benchmarks follow] Just for the fun of it, I ran the benchmarks too, on a Zenith Z-248 AT clone with 1 MB RAM disk and on a VAX 11-/750 running 4.1BSD. Here are my results and Marty's: Test that forked 1,000,000 times (with 1K stack): Marty Z-248 11/750 real 25.0 19.0 40.0 user 1.6 0.8 1.6 sys 18.4 15.2 36.0 Test that pushed 1 MB through a pipe: Marty Z-248 11/750 real 17.0 9.0 7.0 user 1.0 0.0 0.5 sys 14.0 1.9 5.6 This measure suggests that Marty's machine is pushing 59 kbytes/sec though the pipe (although he claims 80, so I may have misunderstood something). The Z-248 is getting 111 kbytes/sec, the 11/750 with 4.1BSD is getting 143 kbytes/sec, and Marty claims an 11/780 running 4.3BSD gets 120 kbytes/sec. Taken together, these measurements suggest that the raw compute power of a fast AT running MINIX, even using its much maligned C compiler, is at least in the same general league as a small VAX. Andy Tanenbaum (ast@cs.vu.nl)
mitsu@eddie.mit.edu (Mitsuharu Hadeishi) (02/06/88)
In article <760@louie.udel.EDU> you write: >I'm now running Minix on my PC-AT in protected mode (all descriptors in GDT, >hardware task-switching installed, all interrupts and kernel have their own >TSS). >If you want a summary of what I'm doing, drop me a line. If there is sufficient >interest in what I'm doing, I'll post to the net. I'll be ready to post a >complete summary later this week. I'm using Aztec C. > I'm definitely interested. -Mitsu Hadeishi