Funny behaviour of bm under V7

jack at boring.UUCP jack at boring.UUCP
Thu Aug 22 05:37:47 AEST 1985


I'm posting this to unix-wizards too, since I can't pin the
problem on 'bm', so there might be something funny going on
in the V7 kernel.

I observed some very weird behaviour of the Boyer Moore program
posted to net.sources recently.
The problem is: user time is significantly less than that of grep,
but system time is preposterous. Times are as follows, on an 11/34,
running more-or-less v7m, 1Mb, Ampex Capricorn:

---
+ time bm Zurich /usr/dict/words 
Zurich

real     1:00.0
user        3.5
sys        42.7
+ time fgrep Zurich /usr/dict/words 
Zurich

real       33.0
user       18.5
sys         6.6
+ time grep Zurich /usr/dict/words 
Zurich

real       22.0
user       11.2
sys         6.4
---
I tried fiddling with the buffer size being read (512,1024,2048),
but timing stays the same.
Also, profiling shows that the program spends 90% of the time in
read(), so there are no other system calls that could account for
the time difference.
So, what is going on that's making bm 8 times slower than everyone
else?

Anyone out there who can give me a hint on where to look?
-- 
	Jack Jansen, jack at mcvax.UUCP
	The shell is my oyster.



More information about the Comp.unix.wizards mailing list